Student study abroad visas

As a US student, is it possible to study abroad for a semester in Spain and a semester in Italy in the same academic year or will acquiring visas be a problem. Is it possible to get both visas before leaving the US, or do you have to return in between to apply for the 2nd visa?

You should be able to get both before but if not apply at the Italian embassy in Spain.