Humans are mammals, the most successful taxonomic class of organisms to colonise the Earth. The word mammal derives from the Latin meaning of breast, "mamma", where breasts are a consistent trait among mammals in mothers feeding for feeding their young. Coincidentally, the more scientific name for the breast is the mammary gland, which further illustrates the point.
Mammals are a diverse group of organisms, where the majority of them develop their offspring within the uterus of the mother, though exceptions are noted. For example, monotremes lay eggs, like their common ancestors the reptiles and birds.
To further diverse, over time mammals have diversified into the placentals and the marsupials. But before we get into that, first look at the ancestors of the mammals to get a better understanding of how the mammals became dominant in the first place, in accordance with natural selection and geological events.
Ancestors of Mammalia
The taxonomic class Mammalia is within the Vertebrata phylum, which elementarily suggests that the direct ancestors of mammals were vertebrates. This is true of course, as it would have allowed taxonomists to order the species in light of this.
Over three hundred million years ago, when life was beginning to conquer dry land, reptiles had adapted from their ancestors to live on the land, and acquire an ecological niche that otherwise had no competition.
It is believed that a niche of reptiles deemed the paramammals, which have sufficient distinctions between both reptiles and mammals, to suggest that mammals indeed evolved from reptiles.
Although some reptiles were beginning to possess mammal-like features, it was not for another 50 million years that the first distinctive differences were being noticed in species. Land animals were continuing to diversify and occupy new ecological niches and move away from competitive environments. Herbivores soon diversified from the reptiles, while dog-like species were becoming dominant as a competitor to the more reptile-like creatures.
These dog like creatures were beginning to diversify in the land environment, and become a true competitor for land resources, unlike the more water-dependant reptiles. Characteristic changes like cold to warm-blooded, prolonged front teeth, fur and mammary glands helped taxonomists note the difference over time from the transition from reptiles to more mammal like creatures
The Triassic Period (220 million years ago)
While the tussle for resources developed, the mammals remained small and continually changed in various ways of adaptation that allowed them to fill in more land based ecological niches. However, this time on Earth saw the dominance of the dinosaurs, who also derived from the reptiles mentioned above.
Well known to us, dinosaurs continued to dominate and fill a majority of land's major niches for some years to come, but alias, they did not stand the test of time. No one truly knows why the dinosaurs became extinct, but the suggestion of an asteroid hitting Earth would make it plausible to suggest that mammals survived because they were smaller with many species based underground, and also required less energy to survive. This could mean that the mammals were more prepared for such an occurrence, and thus the reason why they survived through the dinosaur extinction.
However, since the dinosaurs were no longer an entity, the mammals now had a huge range of ecological niches to fill, without too much competition stopping them from doing so.
Also, while the dinosaurs ruled on their own accord, true mammals were beginning to develop, exhibiting many of the characteristics you would see in any present day mammal.
The other descendants of the reptiles, Class Aves (birds), were also a dominant force at the time, adopting some dinosaur like aggressive characteristics that were to prove competitive to mammals for some time to come.
Nonetheless, the Class Mammalia of organisms was soon to develop into its own entirety, where all present day mammals are directly descended from. At around 65 million years ago, the first true signs of mammals were to appear.