Frank, a jewel thief (and therefore, a sympathetic "bad guy"), is arrested after taking the fall for his partners. This new prison has a system where two inmates are randomly and unknowingly paired up with someone else, wearing an explosive collar. If the inmates wander too far from each other, their collar will beep for a few seconds before exploding. As a result, there's supposedly no need for the prison to have walls.
For about one-third of the movie, it's a prison drama, as we see Frank adjust to life in prison and witness firsthand the kind of intimidation, beatings, and subversions of the system the inmates engage in. We see him locked in a sensory deprivation chamber as punishment, and urinated on. Prison is a nasty place, even when it doesn't have walls. Frank is a genius with technology, and begins experimenting on his own collar, trying to figure out how it works.
Then, through a series of events, Frank is busted out by Tracy, an inmate he finds annoying. Fortunately, Tracy's collar is linked to his, and thus the "don't go 100 yards apart or your head will explode" rule doesn't cause his death. As a result, we have a man and a woman who are forced to be together via undesirable and contrived circumstances. Sounds like... a romantic comedy?
That's what this movie morphs into. Frank and Tracy run from the law, learn to put up with each other's annoying differences, and pretty much everything that happens from that point on is played for humor, despite the dark tone of earlier. We even get some bumbling cops.
To give an example of just how much the mood has shifted, consider the following scene: Tracy visits a wedding (against Frank's wishes) and slaps one of the people there, resulting in her arrest, and being taken down an elevator by the police. Frank tries to enter the elevator too, but can't make it in time, so he rushes down the stairs, and finally busts out a window to try to get within 100 yards of Tracy. The distance soon causes Tracy's collar to begin beeping. One of the cops receives a radio call telling him the woman he's arresting has a bomb on her neck, so the elevator is stopped and both cops run away in fear, just as Frank shows up.
Despite the movie's shift from serious prison drama to stupid fun comedy, I found the whole thing enjoyable, even if a bit mood whiplashy.