Bad spattering can be caused if you're using dirty or rusted metal, the amperage is set too low, the spool feed speed is too fast for the amperage, or you have a bad ground.
I usually use an air grinder to pre-clean the metal where the welds will be. Also, grind, sand, or clean the metal where you attach the ground clamp unless you're using clean metal.
Get some scrap pieces of the same thickness metal that you typically use and practice welding them with different settings. My welder came with a video and an instruction guide that lists the most common settings for various metal thicknesses.
Basically, it's just a case of practice makes perfect. After a while you'll know your welder and what spool speed and amp settings to use.
Keep your tip at a 45 degree angle when starting the arc and while welding.
oh yeah.... if you're using gas (argon), you can't have any wind blowing the gas away from the weld area. If it's windy you have to put a tent or barrier around the work area. I prefer to use the flux core wire so there's no need to use the gas, which can get expensive or time consuming to refill if you do a lot of welding.