Spain is a big country in Europe. Just like how you have friends and family, Spain also has friends and family, but they are called "countries." Sometimes Spain might have a fight with one of their friends, but most of the time they want to be friendly and work together.
Spain has a lot of friends in Europe, like Portugal, France, and Germany. These countries help each other by working together on things like trade, the environment, and even sports! When Spain wants to talk to their friends in Europe, they can just call them up or send them a letter.
But Spain also has friends that live really far away, like in the Americas or in Asia. They might not be able to just call them up because they live so far away, but they can still work together by sending letters, emails, or even having meetings over the internet.
Sometimes Spain might want to talk with countries that they're not friends with or that they have had problems with in the past. These countries are called "foes." When Spain talks to their foes, they will try to talk nicely to each other so that they can work together and be friends again.
So, the foreign relations of Spain is basically how they communicate with their friends and foes all over the world. They want to be friendly with everyone and work together to make the world a better place.