In one of the first classes of my first-year english course, the professor asked two questions: "How many of you own a thesaurus?" (about half of the class) and "How many of you actually use your thesaurus?" (about an eighth of the class). The people who didn't use their thesaurus looked sheepish, until she declared that a thesaurus often made your writing worse.
Her logic was that because different synonyms for the same word have subtly different meanings, if you simply substituted words you'd often get sentences that didn't mean quite what you thought they meant, especially if you weren't completely familiar with the word. And if you looked it up in a thesaurus, chances were (unless you knew it but were drawing a blank when trying to think of it) you weren't familiar with it.
Consider synonyms for (opening my thesaurus to a random page...) 'impenetrable'. Now my thesaurus says:
impenetrable adj. arcane, baffling, cabbalistic, cryptic, dark, dense, enigmatic(al), fathomless, hermetic, hidden, impassable, impermeable, impervious, incomprehensible, indiscernable, inexplicable, inscrutable, inviolable, mysterious, obscure, solid, thick, unfathomable, unintelligible, unpiercable.
So if you were talking about an impenetrable wall in your writing, but thought you were using the word 'impenetrable' too often, a lot of people would turn to their thesaurus. A 'fathomless' wall? 'fathom' means 'grasp or comprehend'. (when it isn't acting as a unit of measure... don't you just love the english language? ;-)
You can see the problem - and a thesaurus is especially bad for people for whom english is not their first language. But how do you get a variety of words in your writing, so you don't sound repetetive? Well, I just read a lot, starting when I was about 4, and I'm showing no signs of slowing down. How do you do it?