A few points. Firstly, as already mentioned, far more things than just dinosaurs died out. Secondly, the dinosaurs probably didn't just disappear overnight. There are various different theories about the how and why, some which would only take a few thousand years, others which would take hundreds of thousands, or even longer. Either way, it's not a case of some things suddenly dying and others not, it's a case of some things being able to adapt to a new environment and others not. As already mentioned, large, specialised animals will find it much harder to adapt and so are much more likely to die out.
Thirdly, possibly most importantly, is the definition of "dinosaur". Many things often labelled dinosaurs actually aren't, and many of them would have been much closer to reptiles or birds. For example, dimetrodon is one of the "classic" dinosaurs that most people would recognise, but isn't a dinosaur at all and is actually most closely related to mammals. None of the aquatic things often called dinosaurs, such a plesiosaurs, are dinosaurs, and the same for flying ones as well. Many of these belong to the archosaurian group, but so do crocodiles and birds.
The question of why certain species died out and why others survived is an interesting one, but the simplistic view of dinosaurs all dying out and everything else being OK just isn't true. Some dinosaurs died out, along with lots of things that weren't dinosaurs. Other dinosaurs didn't die out and their descendants are still around today.