Complex sentence: The levels are populated with hazards in the form of robots that Dr. Robotnik has trapped animals inside; destroying one frees the creature, but is not necessary to complete the game.
Split into simpler sentences: The levels are populated with hazards in the form of robots inside which Dr. Robotnik has trapped animals. Destroying a robot frees the creature, but is not necessary to complete the game.