Most of the contents of hair spray is made up of propellants and carrier fluids. Some propellants and carriers, such as hydrofluorocarbons and silicones, are fairly harmless, and merely reduce the amount of oxygen you breathe. This can make you dizzy, like holding your breath. These are called asphyxiants.
Some common propellants like nitrous oxide, or propane and butane can actually affect how the brain works. Carrier fluids like alcohol and ether also affect the brain. The effects are caused by either stimulating or blocking receptors in the brain that are normally triggered by natural neurotransmitters.
The effects can be drowsiness or sleep, distortion of vision or hearing, emotional disturbances, or hallucinations. Other, more common effects are headache, nausea and vomiting, slurred speech, loss of control of the muscles and coordination, and wheezing. Prolonged or frequent breathing of aerosol propellants and carriers can result in rashes around the skin areas that are exposed to the chemical.
Death from asphyxiation (lack of oxygen) or from heart failure can result if large amounts of aerosol propellants are inhaled. But since aerosol propellants also get very cold as they expand, they can freeze the delicate tissues in the lungs, nose and throat. The lack of motor control can cause the person to inhale vomit and choke on it. Brain damage can also occur with prolonged inhalation.
But breathing a little bit while using the hair spray is generally not a problem.