Maternity leave: Women have a right to 16 weeks of paid leave for maternity (or more in certain cases). The maternity leave starts either when the birth process begins (labor, breaking water) or with a doctor's notice that the woman can begin the maternity leave at some date before the birth. The first 6 weeks must be taken right away, but the next 10 weeks may be taken any time up to one year later (with 15 days' notice).
The salary while on maternity / paternity leave is paid 100% by social security. The employer pays for somebody to handle the work while they are on maternity leave. The period for requesting maternity benefits starts from the day after the maternity leave begins. In order to have a right to the full 16 weeks, the person must have been on salary long enough (that is, paid into the social security system).
Paternity leave: As of January 1, 2021, the father has a right to the same number of weeks as the mother, and with the same rules.
Unpaid leave ("excedencia" in Spanish): Once the maternity leave has ended, the mother or father have a right to ask for unpaid leave (excedencia) until the baby is 3 years old. These days may be taken all together or in different periods. The company must retain the same job for this person for the first year. For the subsequent year, the company only has to guarantee that the person will have the "same type" of job.
Reduction of working hours: The employee (mother or father) have a right to ask for a reduction of working hours if they have a child younger than 8 years old. In this case, the employee will only receive the salary according to the base hours worked. The company cannot dismiss the employee or the dismissal can be declared invalid ("nulo").
Note that this is a simplified version of the law. For example, there are rules specific to adoption. If you as an employer would like to be sure you are complying with the regulations in Spain for maternity leave for an employee of yours, please let us know.
Guide to hiring employees in Spain
Paid leave of absence in Spain
Types of work contracts, with samples
Guide to a Spanish payslip, with sample payslip
For foreign employees: the Ministry of Employment's guide to working in Spain