Basically, dead bodies are in the earth, whereas the souls in an abode, experiencing either bliss or punishment, yet they remain connected to the bodies.What the Messenger of Allah (peace be upon him) saw is a Karamah (an extraordinary event caused by Allah for or through a pious person) with which Allah blessed him. Allah turned the souls into bodies for the Prophet to see Adam, Ibrahim (Abraham), Musa (Moses), and `Isa (Jesus), peace be upon them all. Also, during Salat-ul-Kusuf (Prayer at the time of a solar eclipse) he (peace be upon him) saw
`Amr ibn Luhay dragging his intestines in Hellfire and mentioned the story of the woman who imprisoned a cat till it died of hunger for which she was punished in Hellfire. (Part No. 2; Page No. 482) May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.