Or they've left some money in their estate to cover it. If so, the executor of the estate will take care of paying the funeral bill. Otherwise, usually a relative or friend pays for the funeral. But they can get the funeral costs back from the estate if there's enough in it.