Here's how to properly prepare for painting with a sprayer.
Cut pieces of plastic sheeting or rosin paper to fit over windows and doors; attach with painter's tape. You may need to apply additional tape to accurately mask the paint lines at the edges. If the trim will be a different color than the walls, either spray the walls first, then hand-paint the trim (if the lines between trim and wall are not straight) or paint the trim, mask the trim, then spray the walls (if the lines are straight).
The spray should be a fine mist. It should cover a fairly wide area, applying paint with even thickness at all points. Start by spraying at a slight angle against moldings and other masked obstructions so you get into the corners. Always keep the sprayer moving. When you spray a large wall area, keep the nozzle pointed straight at the wall at all times; move the sprayer from side to side, rather than turning it at an angle. If the sprayer starts to spit globs, stop and clear the nozzle. This may be as simple as reversing the nozzle and spraying briefly. If you spray too heavily, you will make globs or runs. Stop painting and smooth these with a large brush or roller.
When you stop for a break or at the end of the job, clean the nozzle immediately. It may work to simply replace the paint with slightly soapy water and then shoot the water for a minute or so. You may need to disassemble the nozzle and place the parts in a small bucket of water or solvent. Clean with a small brush and rinse.