This Psalm, like many others, is written from a dual perspective. Some passages are from man’s perspective, and some are from God’s perspective. This Psalm is unique in that some passages are from Jesus’ perspective when He was suffering on the cross.
It is also unique in that it prophesy’s specifics that occurred on the cross. For example, during Jesus’ suffering He became thirsty. He said, “I thirst.” So, the Roman soldier dipped a sponge in vinegar and offered it to Jesus. This Psalm expressed this with the following passage: “For my thirst they gave me vinegar to drink.”
This Psalm paints a picture of Jesus suffering on the cross for mankind. Jesus bore the suffering and pain for the sins of mankind so that we would not have to pay the price for our sins. If we had to pay that price, we would never be allowed into Heaven after we die. God will not live with sinful people.
The sins of those who believe in Jesus are covered by Jesus’ suffering and dying on a Roman cross. Because of Jesus’ atonement for sins, God does not see their sins. Therefore, He will allow those who believe in Jesus to be with Him in Heaven for all eternity.