In the Star Trek universe, the Kobayashi Maru is a Starfleet Academy training exercise for future officers in the command track. It takes place on a replica of a starship bridge with the test-taker as captain. In the exercise, the cadet and crew receive a distress signal advising that the freighter Kobayashi Maru has stranded in the Klingon Neutral Zone and is rapidly losing power, hull integrity and life support.
The cadet is seemingly faced with a decision (a) to attempt to rescue the freighter’s crew and passengers, which involves violating the Neutral Zone and potentially provoking the Klingons into an all-out war; or (b) to abandon the ship, potentially preventing war but leaving the freighter’s crew and passengers to die. As the simulation is played out, both possibilities are set up to end badly. Either both the starship and the freighter are destroyed by the Klingons or the starship is forced to wait and watch as everyone on the Kobayashi Maru dies an agonizing death.
The objective of the test is not for the cadet to outsmart or outfight the Klingons but rather to examine the cadet’s reaction to a no-win situation. It is ultimately designed as a test of discipline and character under stress.