If there is space, someone will move in. With flying dinosaurs going away, airspace opened for birds. Flight takes a lot of energy, but it offers access to flying insects and the ability to see food on the ground. It is also a means of escape from predators and a speedier way to find new digs if things go bad.
Picture a modern reptile, like a turtle or a snake or a crocodile. They move slowly or in bursts and then rest. Reptiles are ectotherms—they regulate body temperature by moving to warmer and colder places. Now picture robins and mice and monkeys. Birds and mammals move a lot. They are endotherms, meaning they produce internal heat through their metabolism and the action of their muscles.
Birds likely evolved from a particular branch of dinosaur-like reptiles called theropods, some of which may have been warm-blooded. What makes a bird? Feathers. However, long before there were birds, feathers had already appeared on some theropods. Birds kept the feathers, scaly legs, and amniotic, hard-shelled eggs, but lost the teeth and vertebrate tail. Too bad.
Feathers are modified scales, extremely specialized for flight. Each feather is an airfoil, like the shape of an airplane wing. The wing is also an airfoil. Air flows faster over the top of an airfoil than below it, pulling it up. Birds have stiff feathers for flight and softer feathers underneath for insulation. (Insulation may have been feathers' original purpose.) Like scales or hair, feathers grow and are regularly replaced.
Feathers are not the only adaptation for flight. Birds also have:
Flight takes a lot of energy. Eating like a bird is no joke. Some birds eat the equivalent of their own weight or more every day. It may look like they are just picking around, but they are doing it constantly. A good pump is also crucial to getting enough oxygen to bird's busy muscles. Birds have a four-chambered heart that delivers more oxygen to the muscles and metabolism and keeps oxygenated and deoxygenated blood separate. This efficient system also enables birds to be warm-blooded. A double circulatory system means double the fun on land.
Birds' brains are relatively larger than those of reptiles and amphibians and birds exhibit more complex behavior. Animals with more complex behavior develop new ways to deal with their situation, including forming social groups and exhibiting some truly elaborate mating behavior. Hence, we get the awesome displays that headline nature shows and some very clever crows.
Here's how feathers may have evolved.