
All animals on Earth are related, even though these relationships aren’t always obvious. The reason these relationships are hard to figure out is that despite the diversity of animals we see, they represent a mere fraction of the life that has ever existed on this planet. In fact, one famous palaeontologist estimated that we know of less then 1% of the Earth’s diversity through time.
To understand the relationships between animals better, we have to look back in time, at the extinct ancestors of the animals alive today (animals living today are called ‘extant’).

-Fish gave rise to the first amphibians, which crawled on to land about 400 million years ago.
-Amphibians and reptiles share a common ancestor about 350 million years ago.
-Mammals and birds evolved from reptiles much later at different times during the Mesozoic Era.
Each of these major transitions was slow. It must be understood that a fish doesn’t become an amphibian overnight. There were many different species of animals that formed that transitory stages between these groups and possessed a unique set of characteristics, a sort of ‘mosaic’ between the two groups.

Prototherians - which lay eggs (eg. platypuses and echidnas)
Metatherians - which let young develop in pouches (marsupials such as kangaroos and koalas)
Eutherians – ‘modern mammals’ which give birth to well-developed offspring (this includes many familiar species such as rabbits, elephants, horses, and humans)
The platypus is a prototherian. This ancient group branched off of the mammal tree of life early on before the other two groups. There are many different prototherians in the fossil record but only platypuses and echidnas are still around. So the past there was a great diversity of egg-laying mammals, but sadly, all of those animals except for platypuses and echidnas) are now extinct.
If you are interested in this topic I recommend visiting Date A Clade, which has an excellent (and more comprehensive) cladogram with detailed information on when major groups of animals split away from each other.