An important part of learning a language is the pronunciation. If you aren't pronouncing the words correctly, speakers of the language won't be able to understand you, which rather defeats the purpose of learning the language.
Some, like Gabriel Wyner of FluentForever to be the very first thing that you ought to learn, even before starting to learn vocabulary. Personally, I like to learn the pronunciation alongside some initial vocabulary, just so I've got something to try to pronounce, rather than just memorising letters and sounds. I've found that actually using a language is the best way to remember it and improve it in all aspects of language learning, including pronunciation. However, Wyner's point that if you learn to pronounce a language incorrectly, then you have to learn the same thing again and having two pronunciations in your head can be confusing is definitely valid - it's best to just learn everything the right way from the beginning.
The best way to learn proper pronunciation is to listen to native speakers. And since moving to a country where your target language is spoken or enrolling in an immersion course aren't always options (and television and music too difficult to understand yet), I've found that the best resource for learning proper pronunciation of a new language is Forvo.
Forvo is a free-to-use site that provides a collection of recordings of words in a language spoken aloud by native speakers. There are both single words and phrases, so if you want to know how a specific thing is pronounced, Forvo is a fantastic resource. The site even tells you where the speaker is from, so if you're learning French, for example, you can see which ones were from France and which from Canada. It doesn't get more specific than that, so if there's a dialect or accent difference between, say, north and south Japan, recordings in both would be labelled the same way, but the pronunciation is still that of a native speaker of the language, which is more than you might have on your own.
If you want to download the files (which I do, so I can load them into flashcards that I make with Anki - more about that later), you will have to create an account, but again, it's free. I've found Forvo to be a fantastic learning resource, especially for languages that don't have the most phonetic of pronunciations (French) or for languages that have sounds that don't exist in English (Korean). It's also nice to hear how a native speaker might break normal pronunciation rules or on which words a native speaker would enunciate less. Plus, it ties learning pronunciation to learning words, so there's context for the sounds you're learning.