We've gone through this personally in our family several times, and it is also a question that is not uncommon in the various parenting groups I work with. This question is so difficult and of course can be approached many different ways to suit the child you are thinking of, but here are some general guidelines.
Be real. Avoid euphemisms like “gone”, “passed away”, or “lost.” Sometimes the child may have no concept of what death even is, so don't use any comparison to sleep or rest. Explain factually that everything alive, dies. Bugs, plants, animals, people- all living cells/creatures/bodies eventually stop working and this is called death. They no longer grow, eat, or breath. Their heart stops beating, their brain can't work anymore. Long before high school biology, children have a sense of what is alive and what is not. A rock is not alive, but a plant is. A car may move, but is not alive. Work with what they have already figured out, and remember, discussions about death are not a once and done thing, but will occur over and over as they grow and revisit these ideas and memories of their loved one.
When explaining why people die, it can be difficult to use language that will not scare them. Old age is a bit easier, as they can understand the concept of worn out and can't work anymore. Illness and accident can be harder. If possible, try not to use the words “sick” or “hurt” since as children, they are likely to get sick and be hurt quite often. Instead, less frequently used words like “disease” or even “ill”, may be less scary, explaining that their body was simply too diseased and could not work anymore. Death from an accident or trauma can be quite disturbing, especially if the child tries to relate it to something they know about, like a squashed bug. You don't need to go into details, but affirm that yes, their body was too damaged to work anymore, so they died.
The difference between the body and the person (spirit or soul) is another tricky bit. Children want to know what happens to the body. Again, go back to other living things like plants or fallen leaves and that they turn back into the earth. Even large bodies like animals and people turn into earth, because the real person is finished with them. Be very matter of fact that bodies are buried in the ground and turn into earth/dirt. For cremation, you don't have to explain the process, but simply say that it some people choose to be buried and turn to dirt slowly and others choose cremation which turns them to dirt much more quickly. If the child persists, you can explain that intense heat is used.
As with many other questions that children ask, always ask them what they think or already know before answering. This is really helpful to clarify what they are actually asking. The old joke about giving a complete reproduction talk to answer, “where did I come from?” when the child actually meant what city they were born in, is funny, but often very true. The purpose is never to hide things from our children, but rather to answer what they are actually asking, and answer it commensurate to their level of understanding.
For religious families, definitely talk about heaven, but avoid using- or even letting children overhear, inaccurate and unhelpful “comfort” about how God “needed them” or that he “took them.” This can be so disturbing for a child and left to wonder who else God might need or take, and can leave the child quite angry with God as well. We teach our children that God is big and all powerful, and then claim he “needed” someone, when clearly the child needed that person more. Stick with the fact that death is part of life, all life ends, and how wonderful it is that when this life ends, that person gets to go to God and never be ill or old or damaged again. Of course we are very sad, we miss them terribly, and just because they are in heaven doesn't make it all better. Encourage them to talk about heaven and what they think their loved one is doing there. This can be incredibly comforting for both the child, and for the entire family who is grieving. The honest grief of a child, and their special glimpses into heaven can be incredibly helpful for all who are grieving this loss.
For non-religious families, you may find comfort in your loved one returning to the earth, or some talk about their loved one turning back into star dust. Some believe in an after-life presence of sorts with the loved one looking after the child, and others do not. There are some really beautiful writings available on this topic for non-religious families.
A very valuable resource can be a local hospice agency. Even if your loved one was not a hospice patient, some agencies offer grief services to their community when funding allows. Even if the agency can't help directly, they will be a valuable resource to recommend area counselors or therapists who may be helpful. Some hospices offer camps (day or sleep away) for children who have had a direct loss, these can be very beneficial in many cases.
Taking care of yourself and your own grief while trying to walk through it with your children is hard. I've been there—and still there, to be honest. Make sure that you are getting the support you need, so that you are then emotionally healthy enough to guide your little ones. Hospitals and churches often provide grief support groups for free or very low fees. You do not have to be a member or be affiliated in order to attend the groups. You may attend one for a few sessions and decide it is not the right fit, and that is OK, but at least try one. If you are reading this to find resources for a friend, remember that one of the most important things you can do for your grieving friends is to facilitate them taking care of themselves. That may mean making phone calls to find counseling or groups, or it may mean providing childcare so they can attend.
As always, please reach out via Facebook if I can be of any additional assistance.