Starting at any pitch & moving by fifths, one passes through all twelve tones clockwise. Passing through the twelve tones counterclockwise moves by fourths.
The Circle of Fifths was invented by Nikolai Diletskii in his late 1670's treatise on composition called the Grammatika. In 1728, Johann David Heinichen improved upon the design to bring us the modern version we use today.