Su.Ki. writes a very good explanation, though she has used the example of the verb "infer", and in her example I agree 100% with her.
However, inter is a curious case. The word could be a verb (to bury someone) in which case it is pronounce the same way as "infer", or it could be a prefix, and then the situation gets a little tricky. When we use inter as a prefix we usually stress the first syllable and not the second syllable, or we don't stress either syllable instead preferring to stress one of the syllables of the word after the prefix.