If you have decided to rent out your property for holidays, you must apply for a Tourism License with the Tourism department of your area.
Although each Autonomous community has their own process, the registration process is very similar.
Here are some links in which you can find the relevant information for each community.