Employment during studies
You are allowed to work during your studies if your employer presents a request for a work permit and all the relevant requirements are fulfilled.
The activities have to be compatible with your studies and the salary must not be a necessary resource for your subsistence or living although it would be taken into account.
Employment after studies
If the conditions are met, you can work in Spain after completion of your studies.
You must have a job offer and your employer must file the application for a work permit. You have to show that you have been in Spain for three years under a student permit. A minimum period of residence in Spain should not be required if you find a job as a highly-qualified professional or if you are going to start up a business.
Besides, after the completion of your studies you can apply for a job searching residence permit valid for a 12-month period.
As a student, you are entitled to be joined by your spouse and children under 18 years old or in your custody for the duration of your studies.
More on reuniting with your family in Spain (in Spanish)