There is also an understanding that any child that dies before the age of discernment or maturity, then that child goes to heaven. Also the people who the message of Islam has not reached and the people who got the message but couldn't understand it.
On the Prophet Muhammad's (peace and blessings of God be upon him) night journey, he saw the Prophet Abraham (upon him peace) entertaining children. When it was asked who these children were then it was answered that these were the children who died on the pure faith. The belief in one God/Allah. This was in a level in Heaven.