Most people without EU Passports apply for this visa which is effectively a resident visa without permission to work in Spain though you can still earn an income in your home country while residing in Spain.
As part of the visa process, you must prove that you can support yourselves financially for the period you reside in Spain.
The visa application which must be submitted to your nearest Spanish Consulate in your home country prior to departure, requires much form filling, collation of official documents and translating them all into Spanish. Just some of the documents required are: police security check, health check, bank statements or pay slips and private health insurance.
If you have EU passports then you can arrive in Spain without the need to have applied in advance for a residency visa however once you arrive, you have three months in which to register as a resident (and obtain the all important NIE card).
You must prove that you have sufficient income to live in Spain and also demonstrate that you have private health insurance cover.
Spouse or Dependent Visa
If one member of your family has an EU passport then you can sponsor your spouse or dependents to stay in Spain.
This can be done within three months of your arrival. You must prove the family connection with a notarised and translated marriage certificate (spouse visa) and birth certificate (dependent visa).
You must also be able to prove that you can financially support your dependents while living in Spain