The first mammals appeared around 225 million years ago, not long after the first dinosaurs did. However, they were not descended from reptiles, but from an entirely separate evolutionary line - the Synapsida - that had lived alongside the reptiles for a very long time. Yes, if you go back far enough, reptiles and mammals do have a common ancestor, and that animal would have looked, to modern eyes, more like a reptile than it does a mammal. But it wasn't a reptile, not in the modern scientific sense, and it belonged to a group of animals that just aren't around any more.
But between the point when that animal lived, and the first mammals appeared, there were a whole host of other, non-mammalian, synapsids. We often divide these creatures into two broad "grades" of evolution: the early, reptile-like, pelycosaurs, and the later, more mammal-like, therapsids. (In fact, of course, the two lived together for quite some time - it's not that one simply turned into the other. Evolution is more complicated than that). A greatly simplified tree of the "true" therapsids is included below, and shows that early mammals had rather a lot of relatives.