The test was a simulation in which the cadet faced an impossible scenario. They were aboard a starfleet ship and a civilian ship named the Kobayahsi Maru was in need of immediate rescue. However, in order to rescue the ship, they would have to cross into enemy territory and risk a battle or even war with the Klingons. The cadet could choose not to rescue the ship and its civilian crew would all die. The cadet could choose to attempt a rescue and Klingon ships would arrive to destroy them all. It was a no-win situation. The simulation was not designed to be beaten, but instead to allow the instructors to watch how the cadets acted under pressure and in the face of failure.
The other thing you need to know is that Kirk actually pulled it off. He took the test twice and failed and hated it. He didn't believe in no-win scenarios. Before his third attempt at taking the Kobayashi Maru test, he cheated by reprogramming the simulation so that the AI Klingons would be too afraid of the name James Kirk to attack. He got in some trouble, but he also was rewarded for his original thinking. That's what Clark from The Office meant when he said that he would "Kobayashi Maru it." He meant that he would find a way to win even when the situation was impossible.
Once I had sufficiently nerded Christy out (and I suspect I've done the same to you), Christy said something really cool. She said that's kind of like salvation.
Here's the scenario. God created us and loves us and wants us to live forever with Him. We rebel against Him and commit crimes of sin daily. Because God is holy and just, He can't let sin go unpunished just like a good judge can't let a criminal off the hook. Because we have sinned against an infinite God, the just punishment is eternity in hell. Because God loves us, He doesn't want us to suffer apart from Him in hell. If He acts out of love and let's us off the hook, He would violate His own justice and righteousness. If He acts out of justice and righteousness, He would violate His great love for us. It's a no-win situation.
Thankfully, like Captain Kirk, God doesn't believe in no-win situations. God thinks outside of the box and comes up with a plan I never would have thought of and certainly never would have volunteered for. In order to maintain His justice, He decides to provide a sacrifice to pay for our sins. In order to pay the infinite debt we owe God, the sacrifice would have to be infinite. No finite sacrifice would do; God would have to die. But in order for the sacrifice to apply to us, the sacrifice would need to be one of us. The sacrifice must be human. So God became flesh in Jesus and Jesus went to the cross to pay the penalty for all of our sin. God's justice is satisfied by the infinite and human sacrifice, we are free to be forgiven and live forever, and God's love gloriously conquers Satan, sin, and death.
It's the most impossible situation but God found a way for you and I to be saved. It's the ultimate Kobayashi Maru. Have you accepted this amazing offer of salvation that God has extended to you in Jesus? You can today. No magic prayer or ritual are needed. Just tell God you need forgiveness and believe in Jesus as your Savior. Are you already a believer? Then let this give you pause. Let this make you stop a moment and reflect on the amazing way that God found a way when there was none because He loves you. Marvel at the good news of Jesus that makes possible the impossible. He saved the unsavable! Praise God!
"...that if you confess with your mouth Jesus as Lord, and believe in your heart that God raised Him from the dead, you will be saved;" -- Romans 10:9