If you come from a country outside the EU and your stay in Spain will not exceed 3 months, you do not need a visa if your country is not required to have a visa to enter Schengen territory, and you have no obligation to be enrolled in a Spanish school. This is the case of countries like the US, Canada and Australia.