It’s a pity that English is not phonetic! In some languages, you can look at a word and know immediately how to pronounce it. But in English you need to be a little more careful.
Take the letters "ough", for example. They occur in many words, but they do not always sound the same.
1. though (like o in go)
2. through (like oo in too)
3. cough (like off in offer)
4. rough (like uff in suffer)
5. plough (like ow in flower)
6. ought (like aw in saw)
7. borough (like a in above)
So how do you know the pronunciation of a word? Well, fortunately "ough" is an extreme example. English words are not always that difficult. But in general, when you learn a new word, you should also make sure you know its pronunciation. If you do not have a teacher or someone to say the word for you, you can look in a dictionary. All good dictionaries give the pronunciation for each word, often with special symbols. So it’s a good idea to look at your dictionary carefully and learn the pronunciation symbols. After that, you’ll always be able to find the pronunciation of any word, easily. Try it with the 7 "ough" words above.