The words gin, jinn sound the same but have different meanings and spellings. Why do gin, jinn sound the same even though they are completely different words?
The answer is simple: gin, jinn are homophones of the English language.
A strong colorless alcoholic beverage made by distilling or redistilling rye or other grain spirits and adding juniper berries or aromatics such as anise, caraway seeds, or angelica root as flavoring.
Any of several machines or devices, especially:
A machine for hoisting or moving heavy objects.
A pile driver.
Plural of jinni.
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.