After the Spanish government approved the law that allows having residence permission for foreigner people, some non residents bought properties in Spain.
On the other hand, every year more non residents buy a property just for having a second home close to the beach to enjoy their holidays or to have their retirement in a quiet place with good weather, healthy food and amazing traditions.
The Spanish government as the majority of governments of Europe obliged to non-residents to pay taxes for their properties. But the first thing you should know is that if you are resident or not.
In broad terms, you are a tax resident in Spain if you live there for more than 183 days in a natural year.
Non residents must pay two different taxes simply for the fact of owing a property in Spain:
1) Impuesto sobre la Renta de No Residentes: you must pay this tax depending on if you rent the property or not. If you rent the property you must pay quarterly the tax, if you don't rent it, you must pay the tax once a year, before the 31st of December of the next year. In this case the tax base is the 24% (24,75% in 2014) of a percentage of the cadastral value.
2) Impuesto de Bienes Inmuebles: This is a municipal property tax. This tax is different at each region and it is calculated by a percentage of the cadastral value of the property. This tax is debt in your bank account if you register it in the city council.
These are not the only asset taxes you should pay. If the amount of your assets in Spain is above of 700.000€ you must pay also the Impuesto del Patrimonio.
This tax was eliminated in 2008 but the government reintroduced it in 2011 due to the crisis. If you have a mortgage you can deduct it to calculate the tax base.
These are the most important taxes related to properties in Spain.
If you don't pay the taxes, the debt is held against your property, so you cannot sell it or change the Title Deed.
Moreover, if you have bank accounts in Spain, they can embargo it, with sanctions, and with interests.
Now, Tax authorities have several ways to know if a property is occupied or not. The Spanish Tax Authority could know who buys properties because they have connection with the Land Registry, and they are increasing controls of information.
They also have access electricity companies to monitor if there is any consumption in the property, to know if the property is rented or not.
When they want to check information they send a warning to the address of the property and if you are not answering because you don't live there, they publish the warning in an official public document (BOE).
In conclusion, if you buy a property in Spain, you should be well advised to avoid problems with the tax authorities.