Cooking an egg "over" refers to frying it on both sides. Whether the yolk is kept runny or cooked to firmness is what is meant by the terms "over easy" and "over hard." A solid cooked egg yolk is cooked to the hard state. The technique for cooking an egg over hard to perfection is to adjust the temperature so it cooks at an even rate. Cooking it too quickly will burn the edges and give it a rubbery texture.
Set the skillet on the stove top burner set to medium-high heat.
Melt butter in a skillet or coat it lightly with extra-virgin olive oil.
Move the pan around so the butter or oil completely coats the skillet.
Crack an egg into the middle of the skillet once the skillet is hot enough to sizzle a drop of water.
Reduce the burner heat to low.
Sprinkle some salt and pepper, to taste, on the egg as it cooks.
Flip the egg over gently with a spatula when the white part of the egg is opaque and firm and the yolk starts to thicken.
Continue cooking the egg until the yolk is completely firm. It should have no runny parts. You can usually tell the consistency of the yolk from the bottom of the egg, but you may have to lift it up slightly with the spatula to determine the consistency.