What are words called that are spelled the same but have different pronunciations?

Homophones. If they are spelt the same they are called homographs and homonyms.