Many churches in southern Spain were once mosques, that were once churches that were once Roman temples. History is layered here.
I think it is useful to think of a kind of time line to show the really long years were are talking about. Roughly:
— 500 years as Roman temples
— 400 years as Christian churches
— 500 years as Muslim mosques
— 700 years as Christian churches

Some of the people in Cordoba evidently object to their Cathedral being called a mosque, since it has not been one for more than 700 years, since 1236. On the other hand, lots of people still call it a mosque and if you search on internet, that is what you find.

When you visit the cathedral, you see the layers, not only layers of Muslim and Christian but layers among Muslim and Christian. It never ended. The Muslim rulers who build the famous arches you see in my pictures and have seen in so many pictures were wise and tolerant rulers. They were replaced by others not so good, and you can see it in their construction. As you get farther away, the construction gets cheaper and more slip-shod.
When Christians reconquered this place, they left most of the Muslim things there, but added Christian symbols. They also added more features, so you have influences through the Renaissance and in the Baroque.

It was not always Muslim v Christian. The Umayyad Muslim rulers in Spain were often on good terms with the Byzantine Christians, since they shared a common enemy in the Muslim rulers of Syria, who had murdered the family of the Umayyad ruler and forced them to flee to Spain in the first place. The Byzantines sent skilled artists to help decorate the place. So Christians decorated the Muslim mosque. After the reconquest, the Christian rulers employed Muslim artists to decorate part of their cathedral, so Muslim artists decorated the Christian church.

It is all very beautiful and the diversity hangs together well, as you can see in my pictures. The decorations and forms are very similar. You can easily tell the difference, however, in that Christians often depict human or animal forms, something Muslims never do.