Just as humans are both primates and mammals because we descended from the first primate and the first mammal, birds are both theropods and dinosaurs because they descended from the first theropod and the first dinosaur.