As soon as the Moors had conquered Spain in 711 AD, the descendants of the Visigoths and the Romans joined forces to try to get the Moors out of Spain again. These Spanish people gradually conquered more and more of
Spain, beginning in the north near France and fighting little by little toward the south.
One famous story about this fighting is the Song of Roland. Roland (according to the story) was a soldier in Charlemagne's army fighting in Spain about 800 AD who was ambushed by Moors (perhaps really the Basques) and died tragically, fighting to the death.
After 1100 the Spanish people were helped by a lot of French soldiers who went to fight in the Reconquest (as it was called) once France became peaceful enough that the French soldiers were not needed there anymore. Still they did not make much headway against the Almohads who ruled Spain, until rebellions and civil war weakened the Almohad kingdom.
Once the Almohads were weaker, the Spanish army was able to beat them pretty quickly. The Christians took Toledo in 1212, then Cordoba in 1236, and by about 1250 the Moors only held the city of Granada in the very southernmost part of Spain. In 1492 King Ferdinand and Queen Isabella finally succeeded in reconquering all of Spain and Portugal. Most of the remaining Moors and Jews fled to North Africa, where many of them settled in Tunisia. Other Jews fled to Greece and Istanbul.