To cook hard fried eggs, first heat a layer of oil in a pan over medium heat. Then, crack the eggs into the pan and cook for 3-4 minutes until the whites are set and the yolks are cooked to your liking. Finally, remove the eggs from the pan with a spatula and enjoy!