The form originated in Ancient Greece and was adopted by the Romans and revived in the Renaissance in the form of term figures. The name of the god Hermes comes from the word herma, and the sculptures originally represented him.
In Athens, they were placed outside houses, temples and gymnasiums for good luck and to avert harmful or bad influences, like the evil eye. They would be adorned with garlands, wreaths, offerings and anointed with oil to obtain luck and protection.
Attic red-figure lekythos, 475-450 BC, Louvre
Consecration of the herm by Fedor Bronnikov
A bronze herma at the Bardo National Museum
|Wikimedia Commons has media related to Herma.|