Non-resident taxation can apply to both companies and individuals.
Non-resident individuals (i.e. those defined as such by the relevant legislation on residence status) currently living and working in Spain, must nevertheless file a non-resident tax return. They can do this either directly or through the paying company depending on exactly where they are from (and are resident), if they present a certificate of residence from their respective countries, then they would file this return with 0% applicable tax (being obliged of course to file a return in their countries of residence). If there is no tax agreement between Spain and their countries of residence, then they would be required to pay 24.75% non-resident tax every quarter.
Non-resident companies can come under 2 categories: permanent and non-permanent establishments depending on the degree of involvement in the spanish market. Different tax rules would apply in each case but generally speaking permanent establishments are taxed in Spain in the same way as resident companies but only in reference to the income actually earned or generated in Spain itself (i.e. not their worldwide income).
Non-permanent establishments would come under similar requirements to those that apply to non-resident individuals.
Updated March 2014