After a person dies there is the time he spends in his grave depending on the person some will be tortured in the grave and some will not feel anything, this will go on until the day of judgement. On the day of judgment all of mankind will be put back together and awaken from the dead. To make a long story short people will be judged on their book of deeds, if the good outweigh the bad he/she will go to heaven, if the bad outweigh the good he/she will go to hell. Depending on if he had a grain of belief that there was only one god, and didnt committ partners with believing in one God eventually will be taken out of hell. Anyone who had that belief and didnt committ partnership will eventually be taken out of hell. On the da of judgment everyone will rise to be judged from Mohammad s.a.w to Jesus pbuh, from gingus khan to hitler, from Adam to the last person on earth.