A frost-proof yard hydrant is commonly installed when you need to access water at a location too far away for a garden hose to conveniently reach a standard exterior faucet. Typically a yard hydrant installation is comprised of a buried horizontal pipe that leads to a long, vertical pipe, called a standpipe, that automatically drains the water out each time the hydrant is shut off. The bottom of the standpipe reaches below the frost line—the depth to which the ground freezes in winter. The water drains out of the faucet and standpipe and into the unfrozen ground, thereby leaving no water that can freeze in the upper portion of the hydrant.
A yard hydrant must work properly to prevent freezing. If you have tried to repair a dripping hydrant without success, or if you find that a piece has broken, you may need to replace the hydrant altogether. Replacing a yard hydrant is not difficult but it can require a fair amount of digging to reach the fitting and supply pipe buried below the frost line.
In our example, the old yard hydrant is connected to an iron water-supply pipe running underground. Your project may differ somewhat if your water supply pipe is made of copper or PVC.
Source: The Spruce