Michel Foucault’s Discipline and Punish is a history of penal systems, albeit one more focused on ideological interpretation than on balanced historical analysis. He opens with a detailed and gruesome description of the torture of Robert-François Damiens, a man who attempted to assassinate Louis XV in 1757, and was the last person executed in France by the method of drawing and quartering. In a typically paradoxical formulation, rather than consider the highly-regulated penal institutions of subsequent eras an improvement over ripping away skin with red-hot metal pincers and pouring burning sulfur on exposed flesh, instead he argues that the new, more humane, prisons merely represent a shift in the locus of punishment and control from the body to the soul.
Bentham's design of the Panopticon, which was never actually built, was intended to reduce the cost of prisons by a design which had two features:
1) A single watchman would have the potential ability to observe all prisoners. The form of surveillance would be omniscient, omnipresent and omnipotent. This means that the watchman would be able to see everything; there would be no place in which the prisoner could go and not be seen nor any aspect of the prisoner's behavior that could not be controlled.
2) Prisoners would be unable to tell whether they were actually being observed or not. Because the prisoner could not know if he was being watched, this meant that at all times the prisoner had to behave as though he were being watched (obeying the regulations of the prison in minute detail), whether that was actually the case or not. This is what Foucault means by "internalization".
Foucault, as Bentham, extends this analysis to control to schools, hospitals, the workplace, and other modern institutions. For Foucault, the metaphor of the Panopticon explains the way in which modern societies control their citizens and how these institutions function in terms of training and deterrence rather than just punishment.