You might find this FAQs section on the Seguridad Social website helpful.
It involves a bit more paperwork than just your ´baja´ from a medical professional. If the page does not show in English, you can change the language with the option to the top right of the page.
You will only be entitled to sick pay if you´ve paid Seguridad Social contributions for at least 180 days in a 5 year period prior to the sickleave and you must be up to date with your payments and continue to pay while in receipt of sick pay.
UPDATE 1.1.2019
Please note that if your incapacity to work is a result of a work related illness or work related accident, you will only be entitled to sickpay if you´ve contracted the extra insurance that covers this (situation before 1.1.2019). No need to comply with the requisite in the paragraph above.
A listing of all the Mutua´s that collaborate with the Seguridad Social re insurance for illness HERE.