To prevent your mask from clouding up, spit in it; rub the spittle around and rinse the mask.
To clear the snorkel tube of water as you ascend after a breath-held dive, tilt your head well back and exhale just as your mask breaks the surface of the water. Keep exhaling as you roll your head forward to continue snorkelling.
If your breathing tube fills with water, don't breathe in. Wait until the top of the tube is above the surface, then blow the water out.