If you have been on sick leave/´baja´ for more than 15 days, the Seguridad Social or the Mutua your employer has his insurance with, will have taken over the sick pay payments.
Once your contract ends, you will continue to receive sickpay, for as long as your ´baja´ continues, but the amount will be different, as will be related to your entitlement to unemployment benefits ´paro´ or unemployment subsidy ´subsidio´. Assuming that your baja is not due to an accident at work or a work related illness, if you´ve worked longer than a year and are thus entitled to paro, your time on ´baja´ after the enddate of your contract, will be taken off your paro entitlement. If your baja is the result of an accident at work or a work related illnes, then your paro will be put on ´hold´ while your baja continues.
If you worked less than a year it will not be taken off the subsidio. It will be put on ´hold´ and the total of your entitlement to unemployment subsidio will be waiting for you, once you´ve received your ´alta´.
The INSS or Mutua will continue to pay your sick pay while on baja. Within 15 days of receiving the ´alta´ you need to apply for (the remainder of) your unemployment benefits/subsidy at INEM/SEPE.
More info through these links.
example 3