Homonymous words look or sound the same — or both — but have different meanings. The words fan, meaning "an appliance for cooling," and fan, meaning "someone who’s enthusiastic about something" are homonymous.
Any two things with the same name are homonymous. If a person names their cat "Tom" after their dad, the two Toms are homonymous. Same spelling isn't a necessary feature for words to be considered homonymous — e.g., horse and hoarse are homonymous: They sound the same, but have different meanings. Homonymous words cause some people a lot of confusion in English, as there seem to be so many of them. They’re great for making puns, though! Just make sure you use the right spelling when you write.