Hard-boiled eggs are cooked by immersing them in boiling water with their shells still intact. The eggs are boiled long enough for the egg white and yolk to solidify. Once boiled, the eggs are left to cool down.