All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
A Muslim must believe that the grave is the first stage of the Hereafter, and that it is either a garden of Paradise or a pit of Hell.
With regard to the torment in the grave that the disbelievers and the Muslim sinners will have, it was narrated on the authority of Al-Baraa’ ibn ‘Aazib that the Prophet, sallallaahu ‘alayhi wa sallam, spoke to his companions about death and said that when a disbeliever or a sinner (Muslim) dies, their soul is returned to the body.
The Prophet, sallallaahu ‘alayhi wa sallam, said that two angels then come, sit him up and ask him about his Lord. He will not know the answer. Then they ask him about the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, and he will not know the answer. Then a caller will call from the sky, saying that this person is a liar, then he is dressed in fire, his grave will be lined in fire and a door will be opened between his grave and Hell, and its heat and hot wind will come to him. Then his grave will contract on him until his ribs are pressed together. [Abu Daawood]
In another wording of this narration, it was mentioned that a blind and mute being would be assigned to hold an iron hammer that is so big that if a mountain is hit with it, it would demolish and become dust. The being will beat the dead person until he turns into dust. Then the disbeliever will cry in sorrow and pain a cry that will be heard by all creatures, except humans and jinn. Then Allaah will return his soul to his body.
This is what some have mentioned about the torment in the grave, which is a matter of the Unseen. Muslims must believe in it as it has been reported to us.
Allaah Knows best.