When Adam and Eve are exiled from the garden of Eden, the narrative briefly mentions that God had the way into the garden protected.
He drove out the man; and at the east of the garden of Eden he placed the cherubim, and a sword flaming and turning to guard the way to the tree of life.
The word 'cherubim' is the plural of 'cherub'. We see not just a single figure blocking entry to the garden, but a host of them. This short reference to 'the cherubim' in Eden is never elaborated on in Genesis. The narrator makes no effort to describe what the cherubim look like, indicating that he expected his original readers to be wholly familiar with their appearance. Fortunately, this is not the only mention of cherubim in the Hebrew bible. By examining those other instances we can get a hold on what the author is portraying here.
References to cherubim abound in the Book of Exodus. When the Israelites escape from Egypt, Moses instructs them to build a special tent to function as a mobile temple; cherubim were to be woven into the curtains (Exodus 26.1,31). The Israelites were also to craft an 'ark', a box of acacia wood, covered in gold, to contain a handful of holy artifacts. Atop the lid of this box there was to be a carving of two cherubim (Exodus 25.17-22). The cherubim were to stand on opposite ends of the lid, 'their faces one to another', with 'their wings' to be 'spread out above'. Later in the biblical narrative, Solomon builds a temple in Jerusalem to replace the tent; the temple also included images of cherubim on its walls and curtains (1 Kings 6.29-35; 7.29,36), and the ark was placed beneath massive statues of cherubim (6.23-28; 8.6-7). As with Genesis 3.24, this description is so scant that the author must have assumed his original readers were already aware of how cherubim looked.
It is when we reach the Book of Ezekiel that we find an actual description of the cherubim, and what we find is impressive and confusing. Ezekiel's career begins with a vision of four cherubim emerging from a burning cloud in the northern sky.
This was their appearance: they were of human form. Each had four faces, and each of them had four wings. Their legs were straight, and the soles of their feet were like the sole of a calf’s foot; and they sparkled like burnished bronze. Under their wings on their four sides they had human hands. And the four had their faces and their wings thus: their wings touched one another; each of them moved straight ahead, without turning as they moved. As for the appearance of their faces: the four had the face of a human being, the face of a lion on the right side, the face of an ox on the left side, and the face of an eagle; such were their faces. Their wings were spread out above; each creature had two wings, each of which touched the wing of another, while two covered their bodies.
Ezekiel describes the cherubim as resembling kindled coals of fire and flashing lightning (1.12-14), and that a set of burning wheels followed under them (1.15-21; 10.2,6-7). In the burning cloud above the cherubim, Ezekiel sees God seated on his throne (1.20-28; 10.1). Ezekiel later places this vision of God enthroned between the cherubim within Jerusalem's temple (10.1-5). A later part of the Book of Ezekiel describes a carving of cherubim, in which they have only two faces, a man's and a lion's, though this may simply be his preferred two-dimensional portrayal of the creature (41.18-20).
A century and a half earlier, the prophet Isaiah similarly saw a vision of God enthroned between many-winged creatures in the temple (Isaiah 6.1-3), though Isaiah specifies six wings instead of four, and he calls the creatures seraphim (burning ones; an apt name, fitting their comparison to 'kindled coals of fire' by Ezekiel). Four centuries after Ezekiel, the Book of Daniel also described God's throne as surrounded by holy attendants and carried on burning wheels (Daniel 7.9). The Revelation of John combined the vision of Ezekiel, Isaiah, and Daniel, implicitly identifying the cherubim with the seraphim (Revelation 4.6-8).
Ezekiel's physical description of the cherubim is undeniably similar to certain mythological creatures found across ancient Near Eastern culture. The closest equivalent, visually, is the Assyrian lamassu (or shedu, the lamassu's male equivalent), Sumerian alad-lammu. The lamassu is presented as having a man's face, a bull's body, and an eagle's wings.
These lamassu had a variety of roles, but they are found alongside city gates, and prayers invoke them as guardian spirits:
Some sources, on the other hand, portray the šēdu and the lamassu as protective spirits which accompany a goddess. In the Old Babylonian hymn to Ištar with subscription for king Ammiditana, the šēdu and lamassu spirits appear favorably at the casting of her eyes. In a late šu ʾilla prayer to Istar the supplicant asks for the protection of the šēdu which precedes the goddess, and the lamassu which follows her. In a prayer to Ea the conjurer asks the god to be his šēdu and lamassu, indicating that a male deity could fulfill both roles.
Beaulieu, The Pantheon of Uruk During the Neo-Babylonian Period, 137
The Hebrew term 'cherub' is in fact an Akkadian loan-word used for the lamassu and shedu.
From the Akk. verb karābu='bless, pray, intercede' come the forms karubu, kāribu='one who prays, intercessor,' applied to the winged, human-headed bulls, the šēdu and lamassu, which were set at the entrance of temples and palaces, and, as inferior divinities, were believed to intercede before the great gods. The Hebrews, then, borrowed the name, and to some extent the functions, of the kerubhim from Babylon, while they purged and elevated the conception.
Cooke, Ezekiel, 112
Within ancient Israelite religion, the cherubim acted as guardians of God's sanctuaries. God's throne was the holiest place in all creation, and the inner sanctuary of the tent/temple represented his throne-room on the earth, with the ark as his throne. It is no surprise, then, that we find cherubim stationed at the entrance to the garden of Eden; the garden was God's original sanctuary on the earth, before either tent or temple.
The cherubim (aka, seraphim) are based on a type of heavenly creature found across ancient Near Eastern religions. The Hebrew word 'cherub' came from an Akkadian term meaning 'praying ones', used to describe one duty these creatures had. In general, they were guardian spirits. Within Israelite religion, the cherubim act as guardians of God's holy places (such as Eden's garden) and attendants of God's throne.