The Psalm is prophetic -
Here are the words of David before he became King of Israel. David was speaking about his own persecution as he hid in the wilderness for 7 years from the jealousy of King Saul.
1 My God, my God, why have you left me? (Psalm 22)
16 For dogs have surrounded me;
The assembly of evildoers themselves have enclosed me.
Like a lion [they are at] my hands and my feet.
17 I can count all my bones.
They themselves look, they gaze upon me.
18 They apportion my garments among themselves
And upon my clothing they cast lots (Psalm 22).
These words were uttered by David about his own personal situation. But they are inspired prophetic words, and they have a second fulfillment in the impalement/Crucifixion of Jesus Christ. For he said just before he died:
46 Eli, Eli, lama sabachthani? that is, My God, my God, why have you forsaken me? (Matthew 27).
Not only this but the soldiers guarding him cast lots over his garments, none of his bones were broken on the stake (the legs of crucifixion victims were routinely broken by the Romans to speed up their deaths if necessary). The robbers on either side of him had their legs broken. Jesus was of course fastened by his hands and his feet to the stake. So here again is history which is also living prophecy. The literal Psalm applies to King David, the Word symbolic meaning applies to Jesus Christ. The application of this psalm of David to Jesus has been known for many years. But no man before 1992 realised that all scripture has a greater application, a greater meaning, not just Psalm 22.