Eggs really should never be hard-boiled (in their shells), but rather hard-cooked; rigorous boiling causes eggs to jostle and crack, leaving the whites tough. To hard-cook eggs, place the eggs in cold water, bring the water to a boil, and then immediately remove the pot from the heat.
Place the eggs in a saucepan and add cold water to cover them by about 1 inch.

Use a pan large enough to hold the eggs in a single layer.
Cover the saucepan and bring the water to a boil over high heat.
You want the water to start boiling as quickly as possible.
Turn off the heat.
If your stove is electric, remove the pan from the burner.
Let the eggs stand in the covered pan: 12 minutes for medium-sized eggs, 15 minutes for large eggs, and 18 minutes for jumbo.
No peeking under the cover!
Carefully drain the eggs in a colander and run cold water over them.

Continue running the water until the eggs are completely cooled. You can also place the eggs in a bowl of ice water.