The herm was, from about 500 BCE onwards, a popular fixture for both public and private structures in Athens and other cities. The cult of Hermes as a god of commerce and prosperity, among other things, was by then well established. Commerce was becoming an increasingly important factor in ancient Greece, especially in Athens, and the worship of its patron gained importance along with it. Herms also stood on street corners and served as milestones, in character with the god they were sacred to. The word "herm" is derived from (h)erma which basically meant a pile of stones such as would be used for demarcation (in modern Greek, the word survives with the meaning of ballast).
The 1.1 to 1.5m (4-5 ft) high object, which consisted of a four-cornered stone pillar topped by a bust of the god and decorated with a phallus on the side facing away from the entrance, was placed beside doorways and entrances. Due to his character as a god of travel and boundaries, the doors people went through to go to one place from another were of course the obvious choice for locating his statue.
The phallus, while it might be considered an unlikely symbol for a god who was not as strongly related to sexuality or masculinity as others were (although his origins in Arcadia did include fertility as one of his realms), was an additional talisman. Since the herm would protect entrances, enhancing it with the yang power of the phallus would increase its potency in protecting from invaders and warding off bad luck. Because of the combined symbolism, the herm was not just an item for rich households but almost omnipresent. In combination with the hearth dedicated to Hestia, the only Olympian goddess who was equally present in daily life, the herm reflects the duality of the sanctuary of the home and the perils of the outside, of active public life and private space. The herm and the hearth were the two essential fixtures of an ancient Greek home.
The most famous historical incident involving herms comes from Athens in 415 BCE. Naturally, it was impractical to go around worshipping every single herm one would come across but, since they represented an important god, the objects were at least treated with respect, if not religious deference. In this incident though, a large number of herms were defaced overnight. The identity and motive of the perpetrators were never discovered. One theory has it that it was done by the city's women, in a kind of bra-burning protest, another that it was just a bunch of irreverent hooligans. By far the historically most plausible theory is that it was done by a political faction that opposed the military expedition that would escalate into the Peloponnesian War and tried to prevent it by demonstrating that the gods were not with them and that Athens was vulnerable to conspirators. The presumed leader of the faction, Athenian general Alcibiades, was indicted on the (then) unusual charge of blasphemy after he returned from the campaign which went ahead anyway. Alcibiades' flight to arch-rival Sparta in the wake of the scandal would deprive the Athenians of a skilled strategist whose services to the enemy were priceless. The term deface is most likely a throwback to this incident, where the statues were vandalized by being literally de-faced.
In current usage, any object consisting of a bust on top of a rectangular pillar is called a herm. The style caught on very soon and citizens would commission herms depicting themselves. It would later also be used for other gods, especially by the Romans. Herms were made well into Hellenistic and Roman times, after which most of them fell victim to Christian purges of idols, but this style of statue is still in use today depicting prominent citizens and businesspeople. As far as I can tell, at least in Athens, most existing, modern herms are of bankers, today's gods of commerce, and decorate the main branches of the city's major financial institutions. How ironically appropriate.