Yes, for a family bereavement, till 2nd grade, so for parents, grandparents, children or grandchildren. Your own or those of your spouse. ONLY if you are married, NOT in a registered partnership (pareja de hecho) unless the latter is specifically mentioned in the convenio in place for your line of work.
How long? Two natural days, counting as of day of decease, so if the family member in question dies on Saturday, you are not entitled to any extra paid leave if you work Monday to Friday. If he/she dies on Monday morning, you are supposed to be back at work on Wednesday.
The 2 days can be amplified to 4 if there is a ´desplazamiento´ needed to attend the funeral. But the law is not specific about the exact requirements to meet. In a ruling from the courts it was said it depends on the distance between towns, available means of transport and effective travel time.
This paid leave does not have to be applied for, it´s a worker´s right, so you only need to inform your employer about the death in your family. If you would like to extend the paid leave with some unpaid days, or holidays you have built up, you do need to apply for permission from your employer.