The golem is a creature of Jewish myth; a man formed of clay, as Adam was said to have been, and brought to life by a skilled rabbi. This usually involves a holy word, either written on parchment and placed in the golem's mouth or carved directly into its forehead. The resulting golem works as a servitor, and is incapable of speech. In the most famous version of the tale, it eventually goes berserk when its creator forgets to deactivate it on the Sabbath, and it ends up breaking the holy commandment not to work at such times.
In D&D, however, the word is used for a much larger class of creatures, humanoid forms made of pretty well any material and animated to serve their creator. Some of these, too, have a habit of going berserk, although the trigger for doing so is decidedly more random.
Clay Golem
The clay golem is, of course, the one that most closely resembles the being in the original myth. In this respect, it's notable that it has to be created by a powerful priest (and, in, 1E, specifically a priest of a benevolent deity), rather than a wizard or necromancer. In 1E, it is shown as a humanoid figure sculpted from clay and apparently wearing a loincloth. For all we can tell from the picture, this might be a part of the moulded clay, just an artistic convention by its creator, but, from 2E onwards, we're told that a leather jockstrap is an essential accoutrement for all clay golems.
One has to question why this might be, and the only reasonable answer seems to be that the earth elemental required to animate the clay body won't do so unless it's, ahem... anatomically accurate. Why the earth elemental might insist on this, however, is a bit of a mystery, and it's compounded by the fact that it's manifestly not true of the clay golems in the 2E and 5E illustrations - which, of course, also are not wearing the garment that the accompanying text says they are. This is because the 2E clay golem has been sculpted as if it's wearing a full set of clothing and armour (which are surely part of its body) and the 5E version is a particularly crude sculpture that lacks nose, ears, or toes, and only has four digits on each hand. And if you can put up with those bits missing, it's hard to see why you'd insist on another body part you'd have no conceivable use for.
The description also implies, incidentally, that nobody creates golems in a female image. (Apparently, at least one such is mentioned in Jewish tales of the beings).
The 5E version also looks as if it's formed from regular, moist, clay and this is implied to be true for most of the others as well. The exception seems to be that clothed 2E clay golem, which resembles one of the terracotta soldiers in the tomb of the first Chinese emperor in our world and, as such, is implied to be earthenware ceramic - that is, fired clay, not the raw material.
As described in 1E, the clay golem is invulnerable to most weapons, even if they are magic, and can only be affected by a few spells specifically intended to damage earthen material. While it's understandable that stabby weapons, such as spears or rapiers, wouldn't do much to something that lacks any internal organs, it's harder to see why axes and swords can't, say, lop a limb off... one would have thought they'd be more effective on a homogenous non-brittle material than a mace would be, but there you go.
The 3E version isn't quite so invulnerable, although it's still pretty hard to hurt, and while the original was at least easy to hit, this one has very impressive armour. It's as strong as a hill giant, while being considerably smaller and, for that matter, is also slightly shorter than in 1E. It still moves slowly and clumsily except when it puts on brief bursts of magical speed. For some odd reason, it is healed by strong acids, which one would otherwise expect to chemically alter the composition of the clay, but have little effect on its integrity one way or the other. Much of this remains true in 5E, although the resistances are downplayed and there's no additional resistance to sharp weapons.
Stone Golem
The stone golem is essentially an animated statue, something that's common enough in myth and fiction, but would not be described as a 'golem' in such a context. We're specifically told that, so long as they're humanoid in form, stone golems can be carved in whatever way the creator wants. Which explains both the stylised forms shown in 1E and 5E and the more realistic statuary of 2E... doubtless many other looks are possible in a range of artistic styles. Presumably, the more powerful earth elementals used to power them are less bothered by anatomical form than are the weaker ones used to animate the lesser golems.
It's also clear from 3E that there's no requirement for a stone golem to be a specific size (as seems to be the case for the clay version), since some exceptionally large ones are stated to exist. The cost of the enchantment probably makes the construction of small ones non-profitable, but otherwise the main limitation may be getting a large enough piece of solid stone and the inconvenience of using something too big to enter castles or whatever.
While flesh and clay golems are inclined to go berserk, following their inspirations in horror movies and mythic legend, stone golems are much more dependable. They remain slow-moving, doubtless because of their ponderous weight - the quoted figure of 2,000 lbs (900 kg) given in 3E is probably about right given the stated height of the golem and the density of granite. The latter is said to be the preferred construction material and explains the impressive armour rating in 3E; the lower rating in 1E is probably due to the fact that you need a decent magical weapon to damage them at all in that edition and hitting them isn't really the problem.
The downside of constructing your golem from stone, on the other hand, is that, compared with clay and iron, it should be much harder to repair if it gets damaged. Indeed, 3E does say that it takes magic to do this, presumably by bonding separated chips of stone back together again. A bonus is that its signature power allows it to slow the movement of other beings around it, possibly by infusing them with earth elemental energy and increasing their density.
Iron Golem
The original version of the iron golem appears to be a manlike piece of iron statuary, possibly cast in a single block. All later versions, however, are shown as mobile suits of armour although, as with the stone golem, we're specifically told that many different forms are possible. Whether there's anything inside the suit of armour or it's simply hollow isn't apparent from the 2E illustration, and is arguable from the 5E one, which at least looks to have a solid hinge at the elbows. In 3E, however, there are some internal struts and pistons clearly visible in places, suggesting something of a more mechanical nature than is the case for the stone golem.
Such automata do figure in Greek myths, with perhaps the closest resemblance being to Talos, a creation of Hephaestos, the smithing god. He was bronze, however, not iron, something that may have been felt to sound less effective in a post-Bronze Age fantasy world. Or the iron golem may simply be an attempt to have something that's basically a robot in D&D, without all the troubling electronics - although rather more robot-like creatures have been introduced to the game since.
As one might expect, an iron golem is difficult to injure absent spells that specifically target metal. It is hampered by lightning, which might well be expected to have some effect on conductive metal, but intense heat is actually beneficial, apparently allowing the softer red-hot metal to meld back into its original shape as if it were being forged. (Of course, a sufficiently hot blast furnace ought to melt it, but then iron isn't known for its resistance to acid either, and that seemingly does nothing to it).
Like all standard golems, it moves slowly, and is as strong as giant much larger than itself - although exactly how strong does vary between editions. This is probably due to a combination of its iron composition being able to sustain more stress than fleshy muscle and the fact that it likely doesn't feel pain and can't be exhausted. As with other golems made from inanimate matter, it must be using the senses of the elemental that animates it, since it doesn't have any natural eyes - although it is notable that its darkvison is superior to that of a regular elemental, so it may be boosted in some way.
An oddity of the iron golem is its ability to spew poison gas. While some of the automatons in Greek myth (although not Talos) could breathe fire, poison gas is a different matter. It might be inspired by the 1963 film Jason and the Argonauts, which features Talos, looking very similar to the 1E illustration. In that film, Talos is animated by poison gas, although he is destroyed once it escapes from his body.
That's clearly very different from the iron golem, which uses poison gas as a deliberate attack that can be rapidly regenerated. While a golem could potentially have some sort of chemical crucible inside it that can mix reagents to create the gas, it doesn't appear to need restocking, and it doesn't eat, so it seems unlikely that the gas is created by any mundane (al)chemical process. Likely, there is some kind of chamber and attached piping, but the gas may be created magically - taking nitrogen and oxygen from the air to make nitrogen dioxide, for example, but without the need for high temperature and a platinum catalyst.