There are several major mobile providers in Spain: Movistar, Vodafone, Orange, and T-Mobile. Smaller providers such as pepephone, simyo, and Yoigo are available, too.
It is impossible to get a contract with a mobile provider in Spain without the Número de Identidad de Extranjero (NIE) and a Spanish bank account. Therefore, unless you have the NIE and an open bank account already, you will have to get a “pay as you go” sim card. You can buy one of those in every mobile store with only your passport/ID. Unfortunately, to get a DSL or fiber-optic broadband connection, a NIE and a Spanish bank account are needed.
Harbour.Space provides free Wi-Fi for their students on the campus.