The rule of ko

A ko is a situation in which one single stone has been captured, and the opponent is forbidden to recapture on the very next move.

DIAGRAM 1
If Black captures the stone at d4 by playing e4...

DIAGRAM 2
...the rule prevents White from recapturing by playing d4 until White has made a play elsewhere first. If it were not for this rule a cyclic situation could go on forever. White might use this move to make a big threat elsewhere on the board (this is called a ko-threat). If Black responds to that threat, White is then free to retake the ko, and now Black is prevented from retaking on the next move.

DIAGRAM 3

Note that this rule only applies for single stone captures, i.e. where one stone is captured and one stone is recaptured. In Diagram 3, Black can capture two stones by playing at f4, and White can immediately capture that Black stone by playing e4.