What is a mezuzah and why do Jews affix a mezuzah to the doorpost of a home?

Thank you to Rabbi Daniel Syme for the answer.

What is a mezuzah?

The Hebrew word mezuzah means “doorpost.” According to tradition, the mezuzah is to be affixed to the doorpost at the entrance to a Jewish home as well as at the entrance to each of the interior rooms except for bathrooms. The mezuzah itself consists of a small scroll of parchment (k’laf) on which are written two biblical passages, Deuteronomy 6:4-9 and Deuteronomy 11:13-21. This scroll is then inserted into a wooden, plastic, or metal casing that is often quite beautiful and artistic in design. A mezuzah may be purchased at any store that handles Jewish religious articles.

Why do Jews affix a mezuzah to the doorpost of a home?

The custom of affixing a mezuzah to the doorpost fulfills the biblical commandment: “You shall write them upon the doorposts of thy house and upon they gates” (Deuteronomy 6:9). The mezuzah distinguishes a Jewish home and is a visible sign and symbol to all those who enter that a sense of Jewish identity and commitment exists in that household.