When you´re on ´paro´, so contributive unemployment benefits, built up from a working history of one year or more, and you fall ill, you are entitled to sick pay. You need to present the ´baja´ from your doctor to the employment agency SEPE/INEM and any following confirmations of continued sickleave as well, until the final ´alta´ when you are declared fit to work again.
Your paro will continue to be paid, at the same amount, but during your sickleave you will also ´use up´ your paro entitlement. If it runs out before you are fit to work again, you need to inform the Seguridad Social INSS and apply for continued sickpay.
The amount you will receive, once your paro has stopped, will depend on whether the cause of your sickleave is new, or whether it is a result of a sickness that you have been on leave for previously, while you were still working.
More info HERE.