The words die, dye sound the same but have different meanings and spellings. Why do die, dye sound the same even though they are completely different words?
The answer is simple: die, dye are homophones of the English language.
To cease living; become dead; expire.
To cease existing, especially by degrees; fade: The sunlight died in the west.
To experience an agony or suffering suggestive of that of death: nearly died of embarrassment.
Informal To desire something greatly: I am dying for a box of chocolates. She was dying to see the exhibit.
A substance used to color materials. Also called dyestuff.
A color imparted by dyeing.
To color (a material), especially by soaking in a coloring solution.
To take on or impart color.
Definitions from The American Heritage® Dictionary of the English Language, 4th Edition and Wordnik.
Homophones (literally "same sound") are usually defined as words that share the same pronunciation, regardless of how they are spelled.
If they are spelled the same then they are also homographs (and homonyms); if they are spelled differently then they are also heterographs (literally "different writing").