Conformal coating is used to increase mechanical toughness (like abrasion), shock dampening, and to protect against moisture, dirt, grime, and arcing.
Certain types of conformal coating are very nasty to get off if you need re work so they can be used to prevent service. But normally you would just use epoxy for that.
Silicone conformal coatings can be soldered through for rework.
Note if conformal coating is applied improperly it can do more harm than good. Silicone, for example does prevent moisture from getting to the PCB, but it is not completely impermeable. Therefore, if air pockets exist, the moisture can permeate through and accumulate against the PCB where they it will never leave.
Do NOT coat a board with anything that it is not meant to be coated with. Hairspray, for example, is meant to stick and stiffen things, not seal them off. Furthermore, isn't hairspray flammable?
The most common types of conformal coating that can be applied by a normal person is acrylic, polyurethane, and silicone. I prefer silicone for reworkability. It's feels softish and pliable. The others are nasty get off.
ParaxyleneParaylene is the really nice one but requires vacuum deposition equipment so it's NASA/military stuff.