How Did Dinosaurs Become Extinct

Around 66 million years ago, dinosaurs ruled the earth. They were the most dominant of land animals and the most ferocious too. Until that time, they had lived on earth for 165 million years! Compare that with the rise of the homo sapiens- we have been on earth for only about 2 million years- and 165 million years seems such a long, long time. Which brings us to the question- why did a species that dominated earth so absolutely and for so long become extinct all of a sudden?