Listen to native speakers as often as possible. The key to good pronunciation is knowing what the language is supposed to sound like. Tune in to a foreign language radio station or watch movies in the language. Foreign films are ideal, allowing you to watch the shapes of the actors' mouths as they pronounce the words. Foreign dubs of English films work as well.
Learn the International Phonetic Alphabet and find a dictionary or vocabulary book for the language you're learning that uses it. The IPA, as it's usually abbreviated, has a symbol for every sound in every language, allowing you to reach near-perfect pronunciation very quickly.
Use a language-learning program that features audio or video with native speakers. Pimsleur and Rosetta Stone are the two most famous such programs, but others are also available. The lessons will work you slowly through the vocabulary, allowing you to hear the same words properly pronounced dozens of times. Practice as you go.