The iPhones bought in Spain are compatible with GSM networks. The reason is Europe uses only GSM technology. So your phone will only support GSM network like AT&T & T-Mobile. CDMA networks will not work like Sprint and Verizon. But one thing you can do is ask your carrier if your device is Carrier Unlocked before you leave from Spain. If so then you have to unlock it so that it can work with other SIM cards as well.
One important thing you can do on yourself is check your phone’s back. If A1662 is written then it will work only on GSM Carriers which includes AT&T, T-Mobile etc. But if A1723 is written than it will work on both GSM and CDMA