Someone can correct me if I am wrong but I believe in the OT people were to keep the law and be obedient to God. That was how they were reconciled to God which is why Christians believe they gave sacrifices to God. (I believe I have read here that Jews do not believe this as Christians do and say there was no need for atonement for sins, but Christians obvisiously believe there is a HUGE need for atonement for sin.)
So, until Jesus, the people were asked to follow God and be obedient to Him. He was to be their only God and they were not to worship false gods.(Which still stays the same for us today).
When Christ came and died and rose again, He was the fulfillment of the OT prophets (which is accepted by Christians and not Jews). This changed the way we are reconciled with God. When Jesus ascended into Heaven, He sent His Holy Spirit to us. This ushered in the "age of Grace" which we live in today instead of having to keep the law. However, all laws are not to forgotten (Jesus stated this very plainly). The 10 Commandments are still ours to live by. But there are rules that were for the Jews that do not apply. It is pretty clear when you study them and read them in the context they were written which still hold and what does not.
It is a belief of many Christians that if you have not heard or cannot understand (Babies, children, unborn babies, anyone who is not able to understand) that God, who is a loving God, knows their innocent hearts and they have the promise of eternity with God.
God is Just and when it comes time to judge, I think He'll judge accordingly. So, people who have never heard or maybe even know in their heart that there is some power bigger than them (even though they have never heard about God/Jesus/HS as we here today) and worship God in the best way they know how, will be accepted into Heaven. This is just MHO and others may feel differently but I believe God looks inside our hearts and sees and understand what we do not.