The two teens were caught red-handed, literally. Officer Asdf just happened to be driving by as the teens launched the brick through the window of the jewelry store. ASDF's heart rate accelerated as he realized these might be the perpetrators of a string of break-ins in the city. The boys were taken to the station for questioning. The officers took them to separate rooms and offered each of them the same deal:
"We've already got you on the destruction of property, and you'll get a three-month jail term for that. We're ready to charge you with five counts of burglary, which will get you a year each. If you'll confess and plead guilty to the burglaries, we'll make the jail terms concurrent rather than consecutive, so you'll just serve a year. And if you testify against your partner in court, we'll drop all charges against you."
This scenario is known as the prisoner's dilemma. Each partner in the crime must decide whether to plead guilty or to keep silent, and this decision must be made without knowing the other's choice.
If both partners plead guilty, they don't get the benefit of testifying at the other's trial, because the guilty plea waves the right to a trial. But they still get the benefit of concurrent sentences, which reduces a five-year prison term to one year. On the other hand, if neither confesses to the burglaries, the only charge against them is the property damage, and for that they will only get three months.
The best case for the individual is to confess when the partner does not. In that case, the partner serves the maximum jail time, while the one who confessed is released.
But, not knowing what choice the partner has made, it's still possible to make a rational decision. If your partner has confessed, you'll get five years if you keep quiet, or one year if you plead guilty. On the other hand, if your partner has not confessed, you'll get three months if you keep quiet, or you can get out of jail free if you squawk. Either way, confession is good for the soul, or something like that.
A rational person, faced with these options, will confess to the burglaries and walk out of jail sooner. The result, if both parners confess, is that they spend a year in jail. But here's the paradoxical twist to this scenario: Had they both kept quiet, thus going against their own self-interest, they would have cut their jail time by 75%.
This paradox is at the heart of the prisoner's dilemma. Each prisoner wants to minimize his/her own jail time, and the options allow each prisoner a rational option to do so regardless of what the other chooses. The true win-win strategy, though, is for both to decide against the rational choice.