These are mezuzah cases. They house & protect a piece of parchment with the Shemah written on them. The Shemah is one of Judaism's holiest & most important prayers. It’s first line is "Hear, O Israel: the LORD our God, the LORD is one". It is used to bless the house and the room that one enters.