Background
Among the Arabs an adopted son was given the status of a real son. People used to call Zayd ibn Harithah (may Allah be pleased with him) Zayd ibn Muhammad, until verse 5 of this same surah commanded that adopted sons be called by their fathers' names, as Ibn Umar (may Allah be pleased with them both) states in Sahih al-Bukhari. Then, by Allah's command, the Prophet ﷺ married Zaynab bint Jahsh (may Allah be pleased with her), the divorced wife of Zayd, so that this custom of the Jahiliyyah (pre-Islamic ignorance) would be broken.
The commentators state that the hypocrites objected to this, and the context makes clear that this verse is the answer: Muhammad ﷺ is not the father of any of your men. Zayd ibn Harithah was not his son, and the sons of the Prophet ﷺ died in childhood; none of them reached adulthood.
Meaning of Khatam an-Nabiyyin
Khatam means seal and last. Just as nothing enters after a seal has been placed, the chain of prophethood ended with the Prophet ﷺ. According to our tafsirs, since there is no prophet at all after him, then even more so no messenger will come, because every messenger is a prophet. The last part of the verse, Wa kana Allahu bi kulli shay'in alima (And Allah is ever All-Knowing of everything), shows that this is the decision of Allah, who knows to whom to give messengership and when to complete its chain.
The Prophet ﷺ himself explained this: he is the last brick of the building by which the building of prophethood was completed, and he said: There is no prophet after me. The noble Companions (may Allah be pleased with them) also understood the verse this way, and therefore the Ummah is agreed upon it.
The Belief in the Finality of Prophethood
This verse and the mutawatir hadith (reported by so many narrators that they are beyond doubt) explaining it are decisive proof that after the Prophet ﷺ no new prophet of any kind will come, neither an independent one nor a so-called zilli or buruzi (shadow or reflected) prophet. The Prophet ﷺ foretold that thirty great liars would appear in his Ummah, each claiming to be a prophet, while he is the Seal of the Prophets. So every claimant to prophethood, and whoever affirms such a claim, denies this verse.
The descent of Isa (Jesus, peace be upon him) near the Hour does not contradict this belief, because he was already a prophet and will come as a follower of the Shariah of the Prophet ﷺ. The belief in the finality of prophethood protects the religion: revelation is complete, and the Quran and Sunnah are sufficient until the Day of Resurrection.
Key Lessons
The messengership of the Prophet ﷺ is for all people and until the Day of Resurrection, so obeying him and following his Sunnah is the only path to salvation. There is no room in the religion for any new revelation, new prophet or new Shariah. Customs of the Jahiliyyah have no standing against the command of Allah, however important society considers them.