According to Greek mythology, Ariadne was willing to help Theseus find his way out of the Labyrinth. In exchange Theseus promised to marry her and take her back to Athens. Ariadne gave him a BALL OF THREAD and told him to secure one end at the entrance to the Labyrinth. He could then unravel the ball as he made his way. By following the thread Theseus would be able to find the way back to the entrance.
Theseus slowly made his way through the Labyrinth, unravelling the ball as he went. He encountered the Minotaur, and after a struggle slew the beast. Together with the others he followed the thread back to the entrance and out of the Labyrinth.