The words jamb, jam sound the same but have different meanings and spellings. Why do jamb, jam sound the same even though they are completely different words?
The answer is simple: jamb, jam are homophones of the English language.
To drive or wedge forcibly into a tight position: jammed the cork in the bottle.
To activate or apply (a brake) suddenly. Often used with on: jammed the brakes on.
To cause (moving parts, for example) to lock into an unworkable position: jammed the typewriter keys.
To pack (items, for example) to excess; cram: jammed my clothes into the suitcase.
One of a pair of vertical posts or pieces that together form the sides of a door, window frame, or fireplace, for example.
A projecting mass or columnar part.
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.