There's no doubt about it. Water will get into your snorkel, whether you submerse yourself intentionaly or a wave splashes water into it. It's an important scuba/snorkel skill you need to know.
Here's How:
Allow yourself to sink below the water until you face is just under the water.
Take a deep breath through your snorkel.
Hold your breath.
Completeley submerse yourself and your snorkel in the water.
Rise to your original position.
Blow a sharp blast of air through your snorkel.
Slowly inhale to see if there is still water in it.
If there is still water in the snorkel, blow another short blast into it.
When the snorkel is clear, continue to breath normally through it.
Tips:
Try not to exhale all your air on the first blast.
When checking to see if the airway is clear don't suck in a huge gulp of air. Do it slowly.
Perfect this skill in a swimming pool first.