You should make your own diagram...it will make more sense to you. In its simplest form, here is how it could go:
A 14/2 cable runs from the panel to the switch. Another piece of 14/2 runs from the switch box to the light.
Inside the switch box, the two whites are just nutted together. The black from the panel goes to the switch, and the other black picks up the other side of the switch. Now at the light fixture, you have a white common, and a black hot which is switched.
There are many variations on how the cables could actually be laid out, but your goal is always to have continous connection of the neutral, and switching of the hot.