As for those who died without faith, they were sent to Sheol to await judgment. As for those who died with faith that is a different story.
Hebrews 11 tell us that the "men of old" were justified by faith. They were assured of things hoped for and had conviction of things not seen. They were commended by God because of their faith. They understood that the universe was created by the word of God.
For example, it was by faith that Abel offered to God a more acceptable sacrifice than Cain. Through this sacrifice Abel was commended as righteous. Through Abel's faith, though he died, he still speaks to us day.
Also, by faith Enoch was taken up so that he should not see death. God took Enoch from this world because He was pleased with him.
Without faith, they understood that that it is impossible to please God. We must remember that as well because whomever draws near to God must believe that God exists and that He rewards all who seek Him.
Noah was a man of faith. God warned him about the flood before anyone ever heard of rain. In reverent fear Noah constructed an ark for the saving of his household. By doing this Noah showed faith in God; thus condemned the world and became an heir of the righteousness that comes by faith.
Abraham had tremendous faith when he obeyed the call of God to go out to a place that he was to receive as an inheritance. And through faith, he went out, not knowing where he was going. By faith he went to live in the land God promised, even though he lived there as a foreigner, living in tents with Isaac and Jacob, who were heirs with him of the same promise.
Abraham was looking forward to the heavenly city that has foundations, whose designer and builder is God.
Abraham's wife Sarah through faith received power to conceive, even when she was past the age to have children. She considered God faithful and believed His promise. Through this...from one man Abraham--though as good as dead, were born descendants that were are numerous as the stars of heaven and the grains of sand by the seashore.
All of these people died in faith. They did not receive the things promised, but from afar saw them and believed them. They acknowledged that they were strangers and exiles on the earth because they belonged to God.
All these people who had faith made it clear that they are seeking a heavenly homeland. They lived for the next world, not this one, they desired a better country, that is, a heavenly one. Therefore God is not ashamed to be called their God, for he has prepared for them a city.