Hi, Steve. Ron and Jay have given you some good tips but I would add 2 items to the prep work. I wash the walls with Tri-Sodium Phosphate (TSP)before masking. This will get off any airbourne dirt plus greasy finger marks and dirt. This is important if you have kids or are a smoker. Use it per package directions.
I also prime with Zinnser's B-I-N before painting. This traps any dirt that you have missed and seals any spackle repairs nicely. This can be tinted to get close to your paint color.
I know that this is a little more work, but it helps your paint job look better and last longer. Better to do it now than having to repaint with another coat now or repaint a couple of years sooner. The same applies to buying the best paint that you can get. A few bucks spent now can delay your next [painting by several years.