A temporary visa will allow you to stay in Spain for anywhere from three months to five years, depending on your circumstances. And, if you find yourself not wanting to part ways with Spain after five years of living there, you can apply for a permanent residence visa.