In the standard Prisoner's Dilemma there are two players A and B. Each player has the option of cooperating or defecting in a single-shot play of the game; each decides what to do without interacting with the other, and their decisions are revealed simultaneously. Suppose that if both players choose to cooperate, they each spend one year in prison; if both choose to defect, they each spend two years in prison; and if one chooses to cooperate and the other to defect, the defector goes free and the cooperator spends three years in prison. Finally, suppose that each player is ideally rational and has perfect and complete knowledge concerning the precise nature of the game being played.
Player A reasons as follows. Player B might cooperate or defect. If B cooperates, then I would do better by defecting than by cooperating. And if B defects, then I would do better by defecting than by cooperating. So regardless of what B does, I would do better by defecting. Player B reasons similarly. So both players defect. And since neither player can benefit by changing strategies when the other defects, mutual defection is a Nash equilibrium of the game, and the only such equilibrium.
The curious feature of the Prisoner's Dilemma is that by defecting each player does worse than had they both cooperated. Here, perfect rationality with perfect and complete knowledge leads to behavior that is suboptimal for both players, both individually and jointly. Perfect rationality and perfect and complete knowledge are hence not necessarily virtues in the context of social interaction, at least not on this analysis.
Human agents, however, often cooperate in situations that at least look very like versions of the Prisoner's Dilemma. There are a number of explanatory options at hand. An interaction that looks like a Prisoner's Dilemma might in fact be a very different game. Indeed, as we will see, it might be a game with features that are not well characterized by classical game theory at all. Further, it is clearly inappropriate to assume that human agents are even typically rational or well-informed.