Turtles breathe by taking oxygen into the lungs and releasing carbon dioxide when exhaling. Water turtles hold oxygen in their lungs for longer periods than other animals, allowing them to remain submerged completely for many hours without running out of air.
Some turtles can also use their anal cavities to breathe. These turtles pull water into their anal cavities where sacs collect the water and filter out oxygen. This allows the turtle to remain submerged without ever having to surface for air. This method of breathing may have developed to protect the turtle from predators or to act as a form of backup breathing in the event that the turtle cannot surface.