The words knock, nock sound the same but have different meanings and spellings. Why do knock, nock sound the same even though they are completely different words?
The answer is simple: knock, nock are homophones of the English language.
To strike with a hard blow.
To affect in a specified way by striking hard: knocked the mugger senseless.
To cause to collide: I knocked my head on a low beam.
To produce by hitting or striking: knocked a hole in the wall.
The groove at either end of a bow for holding the bowstring.
The notch in the end of an arrow that fits on the bowstring.
To put a nock in (a bow or arrow).
To fit (an arrow) to a bowstring.
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").