Hi! That's great. As you probably know no visa is required to stay in Spain for 1-3 months, however if you wish to stay longer you will need a visa. Be sure to verify that there is a visa you qualify for.
As for taxes you are generally considered a tax resident of Spain if you reside in the country for 183 days or more. If you are planning to be in Spain for less than 183 you are will likely not be considered a tax resident. Given that, I'm not a tax expert so it's best to speak to a Spanish tax advisor for personal assitance.
ProSpain Consulting can answer questoins about taxes: https://shehitrefresh.com/prospainconsulting
I hope this helps!
Best,
Cepee, IL Correspondent - Spain