God created them.
You need to specify a time period for the question to be answered. Synapsids, therapsids, and cynodonts could all be called the early ancestors of mammals, but each at a different stage in the evolutionary history of mammals.
reptiles
Evolutionary biologists believe that reptiles existed before mammals, and that mammals evolved from reptiles. Reptiles do not have a cerebral cortex in their brains, but mammals do, therefore, in evolutionary terms, the cerebral cortex is new.
Mammals are distantly related to birds. Oddly, if you look at an evolutionary tree, birds are actually more closely related to reptiles than they are to mammals.
A nail or hoof or claw are common to all mammals and are a shared evolutionary trait.
I and II only
The evolutionary evidence presented by mammals in Australia includes unique marsupial mammals like kangaroos, koalas, and wallabies, which are endemic to the continent. The presence of prehistoric marsupial fossils in Australia supports the idea of an ancient lineage of mammals distinct from placental mammals found elsewhere. The diversity and adaptations of Australian mammals, such as the egg-laying monotremes like the platypus and echidna, further highlight the evolutionary history of mammals in Australia.
Not actually. There were several different marine reptiles that had mammalian characteristics, notably the group known as pelycosaurs. The earliest mammals appeared early in the Age of Reptiles (Mesozoic Era), but were uniformly small in size. The group called synapsids took an evolutionary path to mammals while the sauropsids became today's reptiles and birds.
The earliest record of mammals is the upper Triassic period. They were very, very small, which helped them avoid predation by dinosaurs of the time. This gave them an evolutionary advantage that resulted in the mammals we know today.
Some interesting questions about mammals to explore further could include: How do different mammal species communicate with each other? What are the evolutionary adaptations that have allowed mammals to thrive in various environments? How do mammals navigate and find their way in their surroundings?
Comparative anatomy
Think of it as the same thing as land mammals versus water mammals. Marine mammals first evolved to life on land and then adapted to return to the water, but not all mammals did that. Similar thing with birds. All birds evolved from common flying ancestors, whereas flying mammals evolved from land mammals at a much later point in evolutionary history. Hope that helps.