Ents were created at the request of Yavanna to guard the trees, and thus were called "Shepherds of the Trees".
Ents are a very old race that appeared in Middle-earth when the Elves did. They were apparently created by Eru Ilúvatar at the behest of Yavanna, after she learned that Aulë's children, the Dwarves, were wont to fell trees. Ents were envisioned as Shepherds of the Trees, to protect the forests from Orcs, Dwarves and other perils. The Elves have tales of teaching the trees to talk, and they also taught the Ents to talk: although the Ents were sentient beings at the time, they did not know how to speak until the Elves taught them. Treebeard said of the Elves "curing the Ents of their dumbness" that it was a great gift that could not be forgotten ("Always wanted to talk to everything, the old Elves did").
Ents are tree-like creatures, having become like the trees that they shepherd. They vary in traits, from everything to height and size, colouring, and the number of fingers and toes. An individual Ent more or less resembles the specific species of tree that they typically guard. For example, Quickbeam guarded Rowan trees and thus looked very much like a Rowan (tall and slender, etc.). In the Third Age of Middle-earth, the Forest of Fangorn was apparently the only place Ents still inhabited, although the Ent-like Huorns may still have survived elsewhere, as in the Old Forest.
Almost nothing is known of the early history of the Ents