The pick moves two ways on a string - down and up. Down is called a downstroke and up is an upstroke. Most of the time downstrokes are followed by upstrokes, moving back and forth.
The reason the pick rests against the side of your finger is because you have to be able to change the angle of the pick depending on whether your playing a downstroke:
or an upstroke:
Notice how the angle of the pick changes as you stroke down or up.