The top part is seperate from the pipe taht goes in the ground. Be sure the main water is turned off and it is threaded like a pipe. If you don't know what you are doing you might hire it done so you don't break the pipe that goes into the ground.
I saw that the top was threaded so I thought I could just replace the top part but I did not know if the rod that goes down to the valve needs to be disconnected some how before I unthreaded it. I have to find some place that I can just buy the new head. I talked to some guys at Tractor Supply and they said you have to dig it up and replace the entire thing. Maybe they just wanted to sell me something I don't need?
If it is a freezeless faucet you have to replace the whole thing. They are made so that a valve under the ground opens and drains the water out of the pipe that goes above ground when you close the handle on the top. This prevents the pipe that is out of the ground from freezing in the winter. No easy answers to this one. It will either take the better part of a day for you to dig it up, repair it and fill the hole back up again or you can hire it done and it will take a pro with a backhoe two hours to do it but it will cost you a couple hundred bucks.