The words pain, pane sound the same but have different meanings and spellings. Why do pain, pane sound the same even though they are completely different words?
The answer is simple: pain, pane are homophones of the English language.
An unpleasant sensation occurring in varying degrees of severity as a consequence of injury, disease, or emotional disorder.
Suffering or distress.
The pangs of childbirth.
Great care or effort: take pains with one's work.
A framed section of a window or door that is usually filled with a sheet of glass or other transparent material.
The transparent material used to fill such a section.
A panel, as of a door or wall.
One of the flat surfaces or facets of an object, such as a bolt, having many sides.
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.