The hi-hat pedal is a device that allows the hi-hat cymbals to separate from each other and make contact with each other. The top hi-hat cymbal is clamped on to the hi-hat post by the swing nut here, and as you depress the pedal, the cymbals make contact with each other. When you pull your foot off, they separate from each other.
Your foot can move at different levels with the hi-hat pedal depending on how separated you want the cymbals. If you want them real tight for a tight hi-hat, you would depress really strong on the pedal, and that creates a tight sound. If you want something a little bit looser, you would put a little more pressure toward the middle of your foot, put your foot flush on the pedal, and you get more of a half open hi-hat sound. Now if you take your foot off all together, the two cymbals separate from each other, and you strike the hi-hat totally open.
Now that's not normally done. If you're going to open the hi-hat, and open and close it, I should say, you are going to bring your foot on and off to create either a sound that is more like a chick of the hi-hats, clicking together or coming together, like this. Or if you're playing on the hi-hat cymbals, you'll get an open and close sound as you depress your foot on and off the pedal, like this. And that's how you control the hi-hat from moving up and down.