If someone dies in hospital, the hospital staff will contact a family member (or perhaps a friend) that the deceased person named before they died.
The hospital will keep the body in the mortuary until someone, such as the executor or a family member, arranges for it to be taken away.
An ‘executor’ is the person named in a will who should take charge of doing everything the will asks.
Most funerals take place with the support of a funeral director, who will collect the body from the hospital. Most funeral directors have a chapel of rest where the body will stay until the funeral.