What is the difference between a homonym, a homophone and a homograph?
They describe three overlapping relationships between words, distinguished by whether the spelling, the sound, or both are shared.
Homophones — same sound, different spelling and meaning.
Their, there, they're. To, too, two. Right, write, rite. Flour, flower. These are the ones responsible for most spelling errors, because the ear provides no help at all.
Note that homophones depend on accent. Whether cot and caught are homophones varies by dialect, as does marry, merry and Mary.
Homographs — same spelling, different meaning, and often different pronunciation.
Lead (the metal) and lead (to guide). Bow (a knot, or bending) and bow (of a ship). Tear (to rip) and tear (from crying). Row (a line) and row (an argument).
Homographs pronounced differently are called heteronyms, and they are the reason text-to-speech systems still make mistakes — the pronunciation depends on meaning, which requires understanding the sentence.
Homonyms — same spelling and same sound, different meaning.
Bat (animal, or cricket bat). Bank (river edge, or financial institution). Left (direction, or past tense of leave).
The terminology is genuinely inconsistent. Some sources use homonym as an umbrella term for any of these; others restrict it to words matching in both spelling and sound. Both usages appear in reputable references, so it is worth defining your terms rather than assuming agreement.
A related distinction: polysemy. Where bank has two unrelated meanings from different origins — that is homonymy. Where one word has several related senses — a mouth of a person, a river, a cave — that is polysemy, a single word whose meaning extended. The difference is historical relatedness, and dictionaries decide it by etymology.
Capitonyms differ only by capitalisation: polish and Polish.