You will need a pin adapter that can be used to plug into an outlet in spain. You can buy this at stores like radioshack and bestbuy. You dont need a volt changer because most computers are usually 120 -210 volt compatible (they will work both places, US and Spain).
If your current power adapter has "Input: 110-220V AC" or similar listed on it, all you need is a Europlug/Schuko plug adapter, otherwise you will need a voltage converter specifically made for electronic devices.
There is a voltage difference between America and Europe. As a result, you will likely need a two-prong wall adapter that can convert between the American rating of 110 volts and the European standard of 220 Volts, at 50 Hz frequency. These adapters are readily available for purchase at most travel stores or electronics stores.
Check if your PC's power supply input can work on multiple voltage ranges, some adjust the voltage automatically and some require you to set the proper voltage which in Spain is 220v. If your computer is not able to work with 220v you will need a transformer. Also a plug adapter will be needed, type B to type C.
You will need a voltage converter. Spain has weird shaped electrical outlets that supply 220 volts. In America, currents that come from electrical outlets are 110-120V. So you would need to search for a 110V to 220V converter. Hope this helps!