That depends on the area. If the trail passes through a protected area, a licence may be required. The tourist information centres will be happy to tell you when you might need authorisation.
To climb right up to the summit of Mount Teide, for instance, you will need a specific licence that you can apply for on the web site: www.reservasparquesnacionales.es
If you spend the night at the refuge, however, you can access the summit without that licence, provided you do so before 9 am. For more information, visit: www.telefericoteide.com/altavista