How should I explain death to a child under 5-6 years old if a close family member or friend dies?
I can't answer what you should tell your child, as that is largely dependent on your beliefs, but can try and give you some pointers on how you could talk to your child.
Whatever it is you belief, we found it helped us to talk to our son (5 at the time) in as simple and direct terms possible, and to not be overly emotional ourselves. Of course you want to be warm, empathic and comforting, and can share (and show) that you're sad, but we tried to stay as level as possible.
We also tried to emphasize that it is simply a part of life: everything is born (or made), has a certain lifespan, and then dies (or breaks). We drew parallels to animals, plants, toys, cars etc.
Then we tried to give some thought to the good times we shared, and that we should be thankful for the time we had with the person, and try to hold on to those good memories in our sadness.
Finally, we acknowledged that it was not fair (the death was somewhat premature) and that it was ok to be angry about it - but that that wouldn't change the fact that the person was gone and that we shouldn't let that taint our memories of the person.
Add to this whatever beliefs you hold about life and death that you wish to share (side note: my wife and I belief different things, so we explained this to our son and explained both our beliefs - he decided he liked my wife's better and is sticking with that for now).
The above is what we thought of as age appropriate for our son, and I would simplify for younger children.
Hope that helps!
These conversations can be tough! Here are a few books on the subject:
To add to @Korneel's answer:
After starting to understand death's permanence, our daughter became very worried about my wife and I dying.
The most important things we've stressed to her about it is that: