Short answer
Eggs can be frozen out of the shell. Beat whole eggs lightly or freeze whites separately. Plain yolks need special treatment because freezing makes them thick and gelatinous.
Never freeze them deliberately in the shell
Liquid expands as it freezes and can crack the shell, allowing contamination. If a shell egg freezes accidentally and cracks, discard it. Thaw safely in the refrigerator rather than on the counter.
Whole eggs and whites
Break eggs into a clean bowl, mix just enough to combine and portion them into freezer-safe containers. Label the quantity and date. Whites freeze particularly well; thawed whole egg is most useful in thoroughly cooked dishes and baking.
Why yolks need salt or sugar
Frozen yolk proteins form a gel that remains unusually thick after thawing. Mixing in a small measured amount of salt for savoury use or sugar for sweet use limits that change. Label which treatment was used so it does not spoil the recipe.