As usual it all depends on how your friends use the internet.
For light usage simply go down to your local biblioteca with your wi-fi laptop and browse for free.
Pre-paid mobile also works fine for e-mails and light browsing.
However if your friends want to use SKYPE they really need a landline internet connection, it soon uses up your pre-paid allowance.
All the major suppliers are gradually reducing prices but internet and phone costs are still far higher in Spain than in the UK. Most contracts are for 18 or 24 months so pre-paid may be the answer but again it depends on usage.
Where I live some neighbours share the cost if the wi-fi signal is strong enough to be received in more than one house. With spanish houses this is not normally a problem as the walls are so thin.