Birds are reptiles! That sounds insane, but let me explain.
Biologists use a system to classify animals called the phylogenetic system, which means animals are grouped together based on their ancestry. In this way, birds are reptiles because they’re more closely related to reptiles than anything else, crocodiles in particular. In fact, crocodiles are more closely related to birds than they are to lizards.
The first groups of reptiles evolved about 300 million years ago. About 40 million years later, a group of reptiles called therapsids branched off, which eventually became modern mammals. Other groups of reptiles split off over the next 120 million years, one branch being the dinosaurs. These dinosaurs were only distantly related to modern snakes, lizards, and turtles, groups that had split off at different times. But 65 million years ago there was a massive extinction event, and all dinosaurs were killed except for a single group of feathered dinosaurs. These evolved over the next 65 million years into modern birds.
So birds are dinosaurs, and dinosaurs were reptiles, and thus birds are reptiles.