There is a rule of sorts. If a word has two or three syllables, it's often stressed on the first syllable. If a word has more than three syllables, it's often stressed on the "antepenultimate" syllable -- that is, the syllable before the syllable before the last syllable.
Unfortunately, there are so many exceptions, the rule isn't much use. For example:
Sometimes you can even change the meaning of a word by shifting stress:
content (noun: something which is contained)
content (adjective: happy)
refuse (noun: garbage, trash, rubbish)
refuse (verb: the opposite of "accept")
Additionally, there are a few differences between British and American English.
I think the only way you will learn all this is to listen to native speakers as often as possible.