The study of the evolutionary history and relationships among or within groups of organisms.