homonym

A homonym is a word that is said or spelled the same way as another word but has a different meaning. "Write” and “right” is a good example of a pair of homonyms.

Homonym traces back to the Greek words homos, meaning “same,” and onuma, meaning “name.” So a homonym is sort of like two people who have the same name: called the same thing but different. A homonym can be a word that sounds the same as something else — like by (“near”) and buy (“purchase”) — or it can be spelled exactly the same way and pronounced differently — like minute (unit of time) and minute (“tiny”).

Definitions of homonym
1

n two words are homonyms if they are pronounced or spelled the same way but have different meanings

Types:
homograph
two words are homographs if they are spelled the same way but differ in meaning (e.g. fair)
homophone
two words are homophones if they are pronounced the same way but differ in meaning or spelling or both (e.g. bare and bear)
Type of:
word
a unit of language that native speakers can identify