David wrote Psalms 22 a long long time before Christ came to earth. What he penned in the 22nd Psalm was an accurate prophesy of events that would happen as Jesus was crucified.
It almost reads like a testimony of Christ himself and what he endured as he laid his life down as a sacrifice for the sins of the world.