The earliest mammals, about 200 million years ago, hatched from eggs and then got milk from their mothers, like the duck-billed platypus. But soon after that, about 125 million years ago, these mammals evolved into mammals that were born alive, but helpless and tiny. These tiny babies then lived in a pouch of their mother’s skin and drank milk there until they were big enough to come out of the pouch and live on their own.
Most animals like this have evolved into other kinds of mammals, but the opossum is a good example of an animal that still lives in a pouch when it is a baby.
An opossum baby has to live inside a pouch because it is too small to be able to keep itself warm otherwise, and a warm-blooded animal like a mammal has to keep itself warm. But the smaller the animal, the more surface area it has compared to its volume, and the harder it is to keep warm.