There are a number of theories about how the dinosaurs became extinct, from a massive asteroid impact, huge volcanic eruptions (both causing massive climate changes), infections caused by biting insects, as well as a simple failure to adapt to changing conditions — they did not evolve to survive in the changing conditions of the Earth at that time!
The asteroid impact is the popular theory, putting an extinction-level event at approximately 65.5 million years ago, causing dramatic climate changes. There is evidence to support this in the historial rock records (e.g. an increase in iridium levels), as well as potential sites for the impact e.g. Yucatán Peninsula.
However, there is significant evidence that shows modern birds are related to dinosaurs e.g. archaeopteryx.
There are lots of theories about why the dinosaurs became extinct, but the most common one is the idea that something happened that made the climate change dramatically. There is geological evidence that suggests that around about 65 million years ago, the temperature dropped sharply and the sea levels fell. This would have affected the dinosaurs food supply.
But there are other theories that disease, volcanic activity or radiation could have killed them, or perhaps it was a string of bad luck and several factors were involved! Who knows?!