It could be a combination of factors - depending on your skin type (oily, combination, dry), what tools and methods you use to apply your foundation, and the type of foundation all affect the outcome and end result. If you have dry skin, you probably want to stay away from powder foundations, and make sure you're using a good moisturizer and primer underneath. Try stippling the foundation onto your skin and then very lightly buff it out. If you're using a setting powder over the foundation, use it minimally and make sure you brush off any excess.
Someone else mentioned exfoliating - I have a microdermabrasion scrub from Derma-E that I love. It's under $30, lasts for MONTHS, and has seriously improved the texture of my skin. I used to get those littly dry, flakey, powdery looking patches before but I haven't had that problem since using the scrub. I wouldn't use it more than 2 times a week though, because over-exfoliating can cause your skin to do all sorts of weird things too.