It depends.
Some of the music I like is stuff I have only found out about through word of mouth and is not easily available in record shops, so I'll buy it online. That may mean Amazon or CDnow, but is more likely to be one of the small online retailers who specialise in the music genre in question.
When I buy over the counter, there are a couple of very good shops in town with pretty extensive range. If I feel like it I may check the prices online and compare with over-the-counter; however unless the online saving is huge I prefer to deal with the shops because I really want them to stay open.
I always cast an eye over the budget CD racks in stores that I visit, and often pick up something that was in the back of my mind for some time but which I never got around to buying. The latest one of these was the Bob Marley album, Survival.