A homograph is
a word that has the same spelling as another word, but has a
different meaning, such as lead (to go in front of) and lead (a
metal). The ending –graph means drawn or written, so a homograph has
the same spelling.
Heteronyms are a type of homograph that are also spelled the same
and have different meanings, but sound different, such as above or
bow (tied with ribbon)
bow (of a boat).
A homophone is a word that has the same sound as another word, but
is spelled differently and has a different meaning, such as to, two,
and too. The ending –phone means sound or voice, so a homophone has
the same pronunciation.
A homonym means either a word that is spelled like another, but has
a different sound and meaning (homograph) or a word that sounds like
another, but has a different spelling and meaning (homophone).
OR
A word that is spelled and pronounced like another, but has a
different meaning (homograph and homophone), like by (near) and buy
(to purchase).
Strictly speaking both homographs and homophones are homonyms,
but homonyms can be either or both a homograph and homophone.
Heteronyms are always homographs, but homographs are not always
heteronyms.