To get out of the maze you must find the key and the exit. Fire helps make the torch's light brighter.