Hi Lucie, that’s a great question! When something gets in our nose, like dust or bacteria, it gets caught in the mucus in your nose, which causes your immune system to release histamine in there. This causes irritation, which is picked up by nerves in your face (called trigeminal nerves), which send a signal to the brain to start a sneeze. A sneeze is basically a massive blast of air from your lungs, which is meant to dislodge and get rid of whatever it was that caused the irritation in the first place!
The trigeminal nerves are also the ones that send the pain signal to your brain when you eat something really cold, which is what causes an icecream headache.
I agree with Pete 🙂 and have condensed it down to steps;
a)Irritation of nasal mucosa
b)Olfactory receptors or V cranial nerve endings
c)Stimulus pass via I and V cranial nerve and reach to
d)Sneeze centre in medulla – present in nucleus solitarious and reticular formation
e)Efferent nerves from V, VII, IX, X cranial nerves and intercostal muscles
f)Activation of pharyngeal, tracheal and respiratory muscles