David was looking into the future and speaking of the Messiah’s resurrection. He was saying that God would not leave him among the dead or allow his body to rot in the grave.
“God raised Jesus from the dead, and we are all witnesses of this.
Now he is exalted to the place of highest honor in heaven, at God’s right hand. And the Father, as he had promised, gave him the Holy Spirit to pour out upon us, just as you see and hear today.
For David himself never ascended into heaven, yet he said, ‘The LORD said to my Lord, “Sit in the place of honor at my right hand
until I humble your enemies, making them a footstool under your feet.”’
“So let everyone in Israel know for certain that God has made this Jesus, whom you crucified, to be both Lord and Messiah!”
Peter’s words pierced their hearts, and they said to him and to the other apostles, “Brothers, what should we do?”
Peter replied, “Each of you must repent of your sins and turn to God, and be baptized in the name of Jesus Christ for the forgiveness of your sins. Then you will receive the gift of the Holy Spirit.
This promise is to you, to your children, and to those far away —all who have been called by the Lord our God.”
Then Peter continued preaching for a long time, strongly urging all his listeners, “Save yourselves from this crooked generation!”
Those who believed what Peter said were baptized and added to the church that day—about 3,000 in all.