Sanitation, sanitation, and more sanitation. Keep your gear clean and sanitized--in that order, you cannot sanitize something that is dirty. I see too many brewers end up with bad beer because they cut corners. I've had a few infected batches myself and learned the hard way. You don't need to become a germophobe and attempt to sterilize things. Just be reasonably diligent. Use PBW or unscented Oxiclean for soaking gear, and use a good no-rinse sanitizer, like Starsan to kill most of the microbes. Don't scuff or scratch plastic fermentation buckets or carboys, as microbes can thrive in those nooks and crannies. Replace plastic spigots and tubing from time to time. Sanitize anything that will come into contact with beer, or wort below ~160F. That means spoons, thermometers, wine thief, etc.
There is only one time you want oxygen in the wort--at the time you pitch yeast. After that, try to protect your beer from O2 exposure as much as you can. You rarely need to rack beer to a secondary fermenter vessel. More racking means more O2 exposure, and more potential for microbes to get in. Unless you are brewing a big beer that needs a very long aging period, fermentation can be done entirely in a primary. Then you only rack once for bottling or kegging. Keep splashing and stirring to a minimum.