Well first you go through some kind of judgement. This one can actually be said to be "known", since millions of people who had near death experiences have reported just that. Many times it is accompanied or preceded by seeing your whole life play like a movie and you understanding what was good and what was bad. Of course, from a scientific perspective, it is impossible to say wether these experiences constitute anything real or are something the brain does. From this same scientific perspective it is however important to note that some of those experiences happen with the brain having no measurable activity at all.
After this? Well we simply cannot know in the way that science helps us know things in this world.
So I'll just portray a world view I know very well, the christian, more specifically the catholic one:
When people die, they meet the Messiah, Jesus Christ. They will then see their life through His, through God's eyes and beyond any doubt recognize the actions they undertook with love or without love. In front of His eyes, only love counts, nothing else.
Christ offers them his Mercy, He offers them to take their sins on His own shoulders and to forgive them. In fact He already atoned for them when He died on the cross. But He wants you to accept His Love, to accept His Mercy, to say "Yes, I did wrong and I don't deserve any of what You are offering me".
Since to God, your free will is holy. He would never take it from you. In fact what He actually wants is to be loved or rather, to let Him be the Love inside you. And love is not love if it isn't given freely.
Some people do not accept His Mercy, because they do not want to forgive themselves, they do not want to acknowledge that they were wrong. Some want to take revenge on God for for the fact that they themselves are not allowed to decide what is right or wrong. For the fact that the only being truly free to do anything out of Himself is God (every creature can only ever bring forth anything that God has already made possible), and they are not God. These people will choose to be without God, without the source of love, of joy, of peace. And if there is nothing good inside you or around you, if God is completely absent, you already are in hell.
Those however who do accept His mercy, might go to purgatory, which is not a fiery place, but it is similar to hell in that while you are there, you are without God and since you now know Him, you'll suffer like crazy until everything that is not good in you is burned out.
Then, or if you are a saint right away, you go to heaven. Heaven in reality is not a place with houses or anything the like. Heaven means being with God, living inside His Heart, being one with Love.