English uses different sounds than other languages. For example, the first sound in the word thin and the first sound in the word away are never heard in many languages.
Therefore, you have to:
- know all the English sounds
- listen to how they sound in real words and sentences
- practice your pronunciation — listen to English words and sentences, and try to repeat them as well as you can
It's not so important to spend a lot of time practicing; it's more important to do it regularly. Many learners find that just starting to pay attention to pronunciation helps them improve a great deal.
It is a good idea to try to imitate English words whenever you're listening to anything in English (watching TV, watching a movie, etc.). You should also try to pronounce English words whenever you're somewhere alone with a little time to spare, e.g. while waiting for the bus, taking a shower, or surfing the Web. Once your mouth and tongue get used to the new sounds, you will not find them difficult at all.
You will need at least some talent for imitating sounds (for instance, if you can imitate people in your own language, it should be easy for you to "do" English pronunciation). However, if you don't have these skills, you can achieve a lot with persistence and a little technology. One helpful technique is to record your voice and compare it with the correct pronunciation. This way, you can see where your pronunciation is different from the original and you can gradually make it more native-like.
Oh, and one more thing: Don't let other people tell you that "since you are a foreigner, you will always have a foreign accent".