A herma is a pillar with the head of hermes on top, and a giant, erect stone wang about halfway up the pillar. Ancient Greeks used them as protection from danger. Apparently, they thought danger was working hard on suppressing it's homosexuality.
Like a lot of ancient societies, the Athenians thought that the best way to drive off evil spirits and bad luck was to show the spirits something that would scare even them. This way, the spirits would just say to themselves, "yeah... eff that." Because of this, you see things like paintings of demons in bathhouses, Medusa heads on temples, and giant cocks here and there, such as the case of the hermai, which were littered all over Athens for protection.
Look away from the phallus for a moment, and look up. See the head on top of the pillar? That's supposed to be the head of the god, Hermes. Likewise, the phallus is supposed to be the "head' of the god, Hermes. They likely used Hermes for this very important piece of statuary because as well as being a messenger god, Hermes was a god of luck, a god of travellers, and a god of thieves. So of course, having his statue wave his junk in your face was sure to help you!
Yes. You see, in 415, the Greeks were in a little war called the Peloponnesian War. This was where the Athenians went to war against the Spartans. This was after that whole fight at Thermopole. You know, the one with the 300 spartans? Yeah, lets just say that the Athenians weren't taking any chances. So, when they all woke up one morning to see most of the hermai in Athens vandalized ( likely both heads were defaced) they were rather upset. Many Athenians believed that it was the work of a group know as the hetaireiai, who were a bunch of young men who drank a lot and participated in what was considered dangerous or treasonous activities. Basically a bunch of drunk young guys who thought their society had issues, and wanted to fix it. Most people decided that it was the work of a young rich kid named Alcibiades, who was drunk enough, and stupid enough to do this, and likely get all his friends to do it to. Not for political reasons, just for laughs. The whole situation was made worse because this was done just before the Athenians were to sail and invade Sicily, and Alcibiades was expected to sail on this little trip. So, did they postpone the invasion, and put Alcibiades on trial, or ignore the blasphemy, and go anyway? In the end, the compromised. They let him go on the invasion, which left on time, and then sentenced him to death while he was gone. The Athenians sent a ship after Alcibiades, to bring him back and likely make him have a nice long hemlock tea, but Alcibiades decided that all of a sudden, Sparta looked awful nice this time of year, and defected.