Penal Code § 236 / 237(a)
To prove you guilty of Penal Code section 236, False Imprisonment, the DA needs to prove the following elements:
You intentionally and unlawfully restrained, detained, or confined someone; and
Your act made the other person stay or go somewhere against his or her will.
Please note that this offense rarely has anything to do with being restrained to an actual jail or prison. A common scenario involves someone holding another person or not allowing him or her to leave a room or a car while in the middle of an argument.
The DA can charge this offense as a felony or misdemeanor. As a felony, however, the DA needs to also prove that you restrained the alleged victim with violence or menace.
If convicted as a felony, you could face up to 3 years in prison. As a misdemeanor, the maximum jail-time is up to 364 days county jail.
In these kinds of cases, which often accompany domestic violence charges, the most successful defense is often that you did not unlawfully restrain or confine the alleged victim. For example, if you defended yourself while being physically attacked, you held the attacker in an effort to calm him or her down, such an act would not be unlawful. Of course, that defense does not work if it's proven that you in fact started the physical confrontation.
Most of these cases happen behind closed doors without other witnesses to say one way or another who's telling the truth. If it's a "he said/she said," the DA knows it will be much more challenging to prove beyond reasonable doubt in court.
Your prior criminal record or lack thereof (as well as the alleged victim's) could become very relevant. For example, if you have a history of domestic violence convictions, the DA would most certainly seek to bring that up to discredit your defense (and a judge would likely permit the DA to do so).
Penal Code 236 / 237(a) for reference:
False imprisonment is the unlawful violation of the personal liberty of another.
(a) False imprisonment is punishable by a fine not exceeding one thousand dollars ($1,000), or by imprisonment in the county jail for not more than one year, or by both that fine and imprisonment. If the false imprisonment be effected by violence, menace, fraud, or deceit, it shall be punishable by imprisonment pursuant to subdivision (h) of Section 1170.
(b) False imprisonment of an elder or dependent adult by use of violence, menace, fraud, or deceit shall be punishable as described in subdivision (f) of Section 368.