Each prisoner is a player, and their rewards can be written as (what they get, what the other person gets). For example, if I kick you in the crotch, my reward matrix is (I get slapstick victory, you get awful crotch pain). Because each prisoner has two choices, we can represent the results in a two-by-two grid.
So if Berto is silent but Robert rats him out, Berto serves 10 years while Robert serves none.
Real-World Application: Jerk Detection
This is where we see game theory's primary use: identifying total sociopaths. Real game theory is a powerful analytical tool, but amateur game theory is often a red flag planted in an a*****e. People who value arithmetic over empathy say you're better as a rat because it leads to a shorter prison term no matter what the other player does. Technically true, if you're a short-sighted a*****e who values numbers over human lives. Which is why game theory is so popular in finance. You couldn't be more of a jerk without a red shell.
The real problem with the prisoner's dilemma is that it ignores data. Like how you might not be a psychotic a*****e who'd throw someone under the bus the moment a matrix told you to. Or how you'll go free only to be stabbed by your partner's angry friends, family, or some random thug he just promised your half of the money to because he won't see it for 10 years.
"We, uh, weren't very good at robbing the bank, either."