Which term is used for words that are spelled the same and may sound the same but have different meanings?

Homonym