Get under the car and try to move everything.
Likely you don't have all of these problems. However, possibilities are not limited to:
1. Tail pipe hanger (holds up tail pipe).
2. Heat shield of the catalytic converter (as mentioned by abimael567).
3. The honeycomb inside the catalytic converter (which means that you need a new catalytic converter if this is broken).
4. The internal structure of the muffler.
5. U-joints (need lubrication or replacement).
6. The emergency brake cable is loose and bouncing around.
7. Wheel bearings
Perhaps the fact that the sound changes when you change from drive to neutral means that the sound is somewhere in the drive train (perhaps the U-joints or transmission?).
Its hard to tell? I had a very annoying rattle only in idle and it was the catalytic converter. I would have it checked out because they are expensive and if that isn't the problem then it is just an extra expense.
check the heat shield of the catalytic converter.
it may have become lose and you just need to stick back into place.
Sounds like a rattlesnake in the engine.
It's a 1995 civic 4door the rattle sound only happens when the cars been driven for a while and if I'm holding on the brakes. The rattle sound stops as soon as I give it gas. Also I've noticed that the noise stops when I change gears from drive to neutral. Sounds like it's coming from right under the gear box, maybe the catalytic converter what could it be? Do I need a completely new cat? I've been told it's anything from an air leak to heat shield to the cat being no good