You have to collect pieces of an amulet. Whenever you pick up a piece it's replaced with an arrow which can only be trespassed in that direction, thus creating a maze.