"It" refers to the Aztec civilization, but you are correct: they literally destroyed the Aztec pyramids too. The writer is using an analogy in this sentence, so your question is understandable. The Spaniards who came to the Americas wrote a lot about the Aztecs, and then these Spaniards destroyed the Aztec civilization. They destroyed both the Aztec culture and the Aztec pyramids. They literally used the stones from the pyramids to build their churches, which was symbolic of how they also destroyed Aztec culture.
I hope this helps!