REcently it was confirmed that an asteroid wiped out teh dinosaurs. Of course that tehory has been around for maybe thirty years, but recent findings seemed to all but confirmed that idea.
According to one paper. Other scientists still disagree. In fact, I find the claim of "confirmation" rather disingenuous, because there's no dispute that the Chicxulub impact happened, merely question over whether it and it alone killed the dinosaurs. The theory I gather was gaining ground was that mass extinctions are a combination of two factors, a long-term stressor that renders the population vulnerable (such as disease) and a sudden traumatic event that finishes them off.
So if the dinos were wiped out in one swoop how did birds evolve?
As stated, birds came along well before the K-T extinction. Evolution isn't a ladder, but a tree; new forms don't come after old forms in a neat line, but branch off and coexist with them.
The key is that in extinction events on land, it's the largest, most dominant forms that are the first to go. The biggest critters need the most food, so if a climatic catastrophe makes food scarce, it's the gas-guzzlers that die out while the little critters that can get by on less survive. Also, the smaller critters breed faster, so they can evolve faster. If it takes, say, twenty generations for a useful adaptation to arise, a creature that has a new generation every year can adapt to an abrupt environmental change within two decades, whereas a larger creature that takes fifteen years to reach sexual maturity would need three centuries to catch up, by which time it would've already gone extinct.
This is why mammals and birds survived the K-T extinction and the big, dominant order of life, the non-avian dinosaurs, died out. It's because the mammals and birds were smaller. The meek literally inherited the Earth. As with any revolution, the folks at the top of the pecking order are the first against the wall, while the great mass of little people just carry on with their lives beneath the radar.