Remove the old hinge pin. Place the screwdriver at the edge of the hinge pin and tap it lightly with the hammer until it comes out. A spray-on lubricant could be helpful if the hinge pin is old and rusted. Spray on the lubricant, wait a few minutes and remove the pin. In extreme cases, you may need to press a nail against the bottom of the hinge pin and tap upward against the nail with the hammer.
Examine the hinge for damage. After removing the hinge pin, check the hinge carefully to make certain that it is not damaged or rusted. If there is rust, remove it before continuing. Steel wool pads and a solvent can be used to remove the rust.
Install the new hinge pin. Place the new hinge pin into the hinge and tap it lightly into place with the hammer.