A snorkel is a tube with openings on both ends and a mouthpiece attached to one side. It makes it possible to breath on the surface while keeping the head under water.
Basic knowledge for Open Water Diver* (OWD*)
During the dive you do not need your snorkel. However, it makes sense to keep a snorkel at least with you while diving from a boat or in the sea. If it is necessary to swim back to the boat or the coast at the end of the dive, it is much more comfortable and easier to snorkel through the waves than to swim through them.
You should not attach your snorkel to the mask strap, because it would bring you into trouble, if you would have to take off or on your mask during the dive. You can easily carry the snorkel in the BCD pocket, your suit pocket or attached to your diving cylinder with a special holder.
Knowledge for Experienced Diver** (ED**)
In order to avoid breathing dead space, a snorkel may be no more than 35 cm in length and not more than between 1.8 cm to 2.5 cm in diameter.
Never extend a snorkel because you do not replace your exhaled air with fresh air and you end up with oxygen starvation. Secondly you will create a relative negative pressure in your chest. As result blood is pulled back into the chest which can lead to heart problems.