It really depends on what you're looking for and how much you're prepared to pay. If you're looking at the cheap`end of the market, you want junk shops: look for signs saying Almoneda. There are a number in the Rastro. For quality, there are three main districts: the Rastro (look out for 17th and 18th century doors and window rejas), calle Prado and Huertas areas, and the Barrio Salamanca. There are some shops specialising in rustic, peasant type stuff – they tend to be in warehouses outside town and I'll have to get back to you on that.
The Madrid antique fairs are in November and December.