The even-toed ungulates form the mammal order Artiodactyla. They are ungulates whose weight is borne about equally by the third and fourth toes, rather than mostly or entirely by the third as in perissodactyls. There are about 220 artiodactyl species, including many that are of great economic importance to humans.
As with many mammal groups, even-toed ungulates first appeared during the early Eocene (about 54 million years ago). In form they were rather like today's chevrotains: small, short-legged creatures that ate leaves and the soft parts of plants. By the late Eocene (46 million years ago), the three modern suborders had already developed: Suina (the pig group); Tylopoda (the camel group); and Ruminantia (the goat and cattle group). Nevertheless, artiodactyls were far from dominant at that time: the odd-toed ungulates (ancestors of today's horses and rhinos) were much more successful and far more numerous. Odd-toed ungulates survived in niche roles, usually occupying marginal habitats, and it is presumably at that time that they developed their complex digestive systems, which allowed them to survive on lower-grade feed.
The arrival of grasses during the Miocene (about 20 million years ago) saw a major change: grasses are very difficult to digest and the even-toed ungulates with their highly-developed stomachs were better able to adapt to this coarse, low-nutrition diet, and soon replaced the odd-toed ungulates as the dominant terrestrial herbivores.
The artiodactyls fall into two groups which, despite underlying similarities, are rather different. The suoids (pigs, hippos, and peccaries) retain four toes, have simpler molars, short legs, and their canine teeth are often enlarged to form tusks. In general, they are omnivores and have a simple stomach. (The two hippopotamus species are exceptions.)
The camelids and the Ruminantia, on the other hand, tend to be longer-legged, to have only two toes, to have more complex cheek teeth well-suited to grinding up tough grasses, and multi-chambered stomachs. Not only are their digestive systems highly developed, they have also evolved the habit of chewing cud: regurgitating part-digested food to chew it again and extract the maximum possible benefit from it.