I've had this problem several times and twice it went as far as turning into mastitis. Once I start feeling a lump grow, I put warm packs on my breast before nursing and I massage the lump toward the nipple while baby nurses. This is incredibly painful, as you well know, but you've got to get the milk moving again. I found that I only have these problems when we're traveling or I've been away from my boys for too long. I nurse twins, so I produce a lot of milk and it only takes four or five hours without nursing to start causing problems.
Another thing I read is that you should consider reducing the amount of saturated fats in your diet (e.g. butter and ice cream), if you have trouble with clogged ducts. In my case, the butter and ice cream are here to stay, so I just make sure to nurse often.
Good luck!
P.S. I just read the other posters' comments. I'd be cautious about pumping to relieve clogged ducts. You're breasts work on supply and demand; by pumping you're telling your body to produce even more milk. Baby, heat and massage are your best bet.