You're referring to some of Jesus' last recorded words, spoken while He was dying on the cross. The Bible says that He "cried out in a loud voice... 'My God, my God, why have you forsaken me?'" (Mark 15:34).
What did He mean by this? Was He suddenly filled with doubt, wondering if He had misunderstood the mission God had given Him? Or was He filled with despair, concluding He was a failure and all His work was in vain? After all (some have said), the crowds had turned against Him, and seemingly His ministry had come to an abrupt end.
But in reality His words point to something far different. They point to the fact that when Jesus died on the cross, all our sins -- without exception -- were transferred to Him. He was without sin, for He was God in human flesh. But as He died all our sins were placed on Him, and He became the final and complete sacrifice for our sins. And in that moment He was banished from the presence of God, for sin cannot exist in God's presence. His cry speaks of this truth; He endured the separation from God that you and I deserve.
This is a profound truth -- and yet it also should bring us great comfort. Because Christ died for us, we need not fear death or Hell or judgment! The Bible says, "For Christ died for sins once for all, the righteous for the unrighteous, to bring you to God" (1 Peter 3:18). Are you trusting Him alone for your salvation?