On the doorposts of Jewish homes a passerby can likely find a small casing like the one pictured at right. This ornament is known as a mezuzah (Hebrew, "doorpost") because it is placed upon the doorposts of the house. As many people incorrectly believe, the mezuzah is not a good-luck charm nor does it have any connection with the lamb's blood placed on the doorposts in Egypt; rather, it is placed to serve as a constant reminder of G-d's presence and His commandments to the Jewish people.
The commandment to place a mezuzah on the doorpost is derived from a passage in the Book of Deuteronomy commonly known as the Shema. In this passage, G-d commands the Jewish people to keep His words constantly in mind and heart by (among other things) writing them on the doorposts of their houses. The custom became to write the words of the Shema on a tiny scroll of parchment, on the back of which the name of G-d is also written, and then roll up the parchment and place it in a case so that the first letter of the G-d's name (the Hebrew Shin) is visible. It is more common now for the letter Shin to be written on the outside of the case.
This parchment scroll must be handwritten and must be placed in the case to fulfill the commandment. It is commonplace for gift shops to sell cases without scrolls, or with mechanically printed scrolls, because a proper scroll generally costs more than even an elaborately decorated case. According to traditional authorities, mechanically printed scrolls do not fulfill the mitzvah of the mezuzah, nor does an empty case.
The case and scroll are then nailed or affixed to the right side doorpost on an angle, with a small ceremony called Channukat Ha-Bayit. A brief blessing is then recited:
Why is the mezuzah affixed at an angle? The rabbis could not decide whether it should be placed horizontally or vertically, so they compromised!
Every time a Jew passes through a door with an affixed mezuzah, he or she is to kiss their fingers and touch them to the mezuzah, expressing love and respect for G-d and his commandments and reminding themselves of the commandments contained within them.
It is proper, and even recommended, to remove a mezuzah from the doorpost if you are moving (or even remodeling) as the subsequent owner may treat it with disrespect, a grave sin.
Sources: Judaism 101