The definitions given here are based on those found in many standard modern dictionaries, but in practice there is a great deal of confusion about the precise meaning of these words, and a variety of other interpretations may be encountered.
A HOMONYM is a word that has the same pronunciation or spelling (or both) as another word, but a different meaning. Homonyms can be subdivided into:
Homonyms that are spelt and pronounced the same such as mean (intend) and mean (miserly) are both homophones and homographs.
Some sources state that homonym meanings must be unrelated (rather than just different), or that the words must have a different origin. Thus read (present tense) and read (past tense) would not be homonyms.
Heteronyms (also sometimes called heterophones) are words that are spelt the same but have different pronunciations and meanings (in other words, they are homographs which differ in pronunciation). For example, the homographs desert (abandon) and desert (arid region) are heteronyms, but mean (intend) and mean (miserly) are not.
In derivation, homonym means "same name", homophone means "same sound", homograph means "same writing", heteronym (somewhat confusingly) means "different name", and heterophone means "different sound".
William S. Huff devised a graphic representation for the differences between sight, sound and meaning. A solid bar is used to mean "same" and a broken bar is used to mean "different". Bars are arranged in vertical groups of three with the top indicating "sight", the middle indicating "sound", and the bottom for "meaning".
This gives you 8 permutations in which the groupings mimic the familiar symbols found in the I Ching (Book of Changes).