After our bodies are placed in the ground our spirits continue to live in a different dimension in the spirit world where everybody who has lived on this earth will enter.
The spirit world consists of Paradise & the spirit prison. If we have lived good honourable lives in service of looking after our fellow beings we will live in paradise. If our lives here on earth have been of a criminal nature, you will enter the spirit prison until you have taken the opportunity to accept Christ in your life & wait for someone on earth to baptise you by proxy in the Holy Temples of the Church of Jesus Christ of Latter day saints.
Your name on genealogical records will be taken to one of these temples and someone on earth living will be baptised on behalf of you whilst you are in the Spirit World. You can be assured as a spirit being that you can either accept the baptism or reject it. This is according to the Holy Plan of our father in Heaven who has given us our free agency to choose our eternal welfare to live with him in the eternities or be damned (stop progressing in the eternities).
The scripture in the bible for Baptisms for the dead is found in 1 Corinthians 15:29.