All beginner snorkelers must learn the right way to fit and use a snorkel mask. This is not just for safety, but is good common sense. You do not want to be wondering what to do on your first underwater adventure. To begin with you need to ensure that the mask fits properly. If it does not fit right then it will allow leaks and the water will come in. The mask must seal around your face. This can be tested by putting the snorkel mask on your face and breathing in using your nose only. Do not use the strap at this time. If the mask stays on your face then it is the right fit. You must also make sure that your hair is not in the mask or it will affect the seal. That includes a mustache. Anyone wearing a mustache may want to consider either shaving it before they go snorkeling or greasing is with Vaseline or one of the lip balms. This acts like a plug.
The strap is the next thing that you want to be sure is a good fit. It should go across the widest part of your head. If it is too low it can allow water in. Make sure the strap is snug, though not tight, because if it is too tight that can also allow water to leak in. If some water leaks do not panic. Put your head back and pull the snorkel mask away from your face just far enough to let the water out. Then reestablish your seal.
Fogging up of the snorkel mask can also be a problem. When the warmth of our face fits the cold of the water this is an inevitable outcome. You can buy various things to defog your snorkel mask and use them before getting in the water. More experienced snorkelers have discovered other things that also work. These include everything from spit to toothpaste. Some snorkelers even a little water floating around in their mask and use that to clear the fog. Over time you will discover what works most comfortable for you.