A funeral is a ceremony that is held because someone has died. A funeral is a gathering of friends and family of the dead person. They will mourn the dead person, meaning that they will feel and show sadness that the person has died, and also say thanks for the life the person had. A funeral is usually held with the dead body present but hidden in a coffin, but there are also open casket funerals. During the funeral, or soon after it, the dead body will be buried, cremated (burned) or made to disappear in some other way. A memorial service or celebration of life is a funeral in which the dead body is not present.

Purpose
Funerals are held in all human cultures. Religion is an important part of funeral customs in most countries. At many funerals, they say a prayer for the dead so that his or her soul may rest in peace and have a good time in the afterlife.

There are other reasons why funerals are held. Many of them are to do with helping the dead person's friends and family (the mourners):
It allows the mourners to accept that the person has died. 'Accepting' that the person has died means that they fully believe that the person has died. Once they have done this, they can get used to life without the dead person.
It is a chance for the mourners to say goodbye to the dead person. Many mourners will not have had this chance before the person died.
It is a chance for the mourners to support each other. They will notice that they are not alone in feeling sad.
It is a chance to think about life and death.
It is a chance to remember happy memories of the dead person's life.

Modern funerals have greatly changed over time. Present day funeral or memorial services may often be more like a thanksgiving for the life of the dead person, rather than just thinking about the sadness of death.

Funeral traditions 

A funeral ceremony can be held at a church, a temple, a public building for holding funerals or in many other places.

In North America, it is common for there to be a visitation (also called a viewing or a wake) a few days before the funeral. This is where people are invited to see the dead body.

In Madagascar, people have a ritual called famadihana or “the turning of the bones” in English.  Once every five or seven years, family members exhume the remains of their ancestors.  They clean the bones and spray them with perfume or wine.  They take the skeleton back home to dance with it and introduce it to the younger generation.

According to Balinese Hindu tradition, the soul of the deceased restarts the rebirth cycle once it is free through cremation.  Balinese cremation, or Ngaben, uses an open pyre to incinerate the corpse. The whole memorial often has a festive atmosphere, focusing on celebrating the life of the departed loved one.

Several things often happen at a funeral in a Western country:
 A procession, where the coffin travels to or from the funeral. Nowadays, the coffin is usually carried in a special car called a hearse.
 A eulogy, which is the story of the dead person's life.
 Prayers.  These include prayers to give thanks for the dead person's life, prayers that the soul of the dead person may rest in peace and enter the afterlife, and prayers that the mourners will be able to get on with their lives.
 Singing hymms (religious songs).
 The committal of the dead body, in which it disappears. At Christian funerals, the preacher may say that a person goes from "earth to earth, ashes to ashes, dust to dust".
 At a burial, the coffin is taken to the grave and lowered into it. Once it is in the grave, mourners may throw dirt onto the coffin. This is a symbol of how the body is returning to the ground.
 On the other hand, mourners do not usually watch a cremation. Instead, the coffin might be hidden by curtains near the end of the funeral.
 The playing of music that the dead person loved.
At many present day funerals there is a video tribute played before, after, or during the funeral service. Memorial folders or prayer cards are handed out at many funeral services and this, too, is a way to make a funeral service personal. At funerals it is not uncommon to see a "life reflection" table. Family members sometimes bring favorite pictures or other reminders of the dead person. There are lots of different traditions that different religions use.

References
 

death customs