A spray gun is a piece of equipment which you use to spray paint under pressure onto a surface.
An airless sprayer works by pumping paint at a very high pressure, up to 3,000 psi, through a hose and out a tiny hole in the spray gun tip. The tip is designed to break up the paint evenly into a fan-shaped spray pattern of tiny droplets.
For example a gravity gun uses a cup on top and when you pull the spray gun trigger the needle pulls back allowing the paint to flow due to gravity. Suction spray guns work by drawing a venturi over the paint drawing it through the fluid nozzle.