Dried nasal mucus, pieces of which are colloquially known as boogies or boogers or bogeys, is found in the nose and is a result of drying of the normally viscous colloidal mucus (commonly known as snot).
The mucous membranes in the nasal cavity constantly produce a wet mucus that lines the cavity and removes dust and pathogens from the air flowing through. For the most part, the cilia that also line the cavity work to move the mucus down the nasal cavity to the pharynx where it can be swallowed. Not all of the mucus stays fluid enough to be moved by the cilia. The closer the mucus is to being in the nasal vestibule and near the nostril opening, the more moisture it loses to the outside air, and the more likely it is to dry out and become stuck.
In the animal kingdom, the general term gland falls into two major categories with further subtypes falling under each of these.
An Exocrine gland is distinguished by the fact that it excretes its essential product by way of a duct to some environment external to itself, be it either inside the body or on a surface of the body.