What happened to the dead people before Jesus came to earth?
A simple answer would be the same thing that happened to them after Jesus came to earth. The dead were disposed of when their bodies were able to be found or retrieved, by burial or cremation or some other means. Some were destroyed by natural disaster, and some were buried in watery graves when their boats or ships sank.
The more complex answer probably is what happens to their souls, and I think that is probably what you meant to ask. Technically, the answer I am going to give didn't change until Jesus was resurrected and took captivity captive to heaven (Eph. 4:8-10). His actual coming to earth didn't change anything. It was his resurrection that was the game changer.
Before His resurrection, there were two options for where souls went when the body died. Righteous souls went to a place referred to as paradise. Wicked souls went to a place of torment. These were near each other, but a gulf was fixed between them so it was impossible to cross from one to the other. They could recognize each other and speak with each other. We understand this from Christ's words about the rich man and the beggar named Lazarus (Luke 16:19-31). This was not some parable - he was speaking of a particular rich man and a particular beggar who the people recognized.
When Christ died, He went down and made Himself known to these souls. The righteous souls were taken to heaven when he was resurrected, and from that point on, all who accepted Christ as savior go directly to heaven on death. The wicked souls continue to accumulate in hades or the torment compartment of sheol.
At the rapture, the physical bodies of Christians who have died will be reunited in some fashion with their souls in a perfect state, and the righteous who have accepted Christ as Savior will have their bodies immediately transformed to a perfect state before going to meet Christ in the air (1 Th. 4:13-18).
At the great white throne judgment after the millennial period is complete, the wicked dead will have their bodies reunited with their souls, will stand in judgment, and will then be sent to the lake of fire for eternal punishment (Rev. 20:11-15).