"Mammals, birds, and even other reptiles can take air into their lungs by expanding the chest cavity, but because their ribs are part of the carapace and their shells are rigid, turtles must use another method.
Turtles inhale by means of two muscles located next to the hind leg sockets, below the vital organs. When these expand, they allow air to enter the lungs, much the same way the diaphragm works in mammals.
To exhale, turtles use a third, complex muscle that pushes the vital organs against the lungs, forcing the air out.
Alternative methods of breathing are necessary, however, because when a turtle senses danger and withdraws its head and legs into its shell, the air in its lungs is forced out (sometimes producing a hissing sound, which many people mistakenly interpret as a hostile gesture).
If a turtle is threatened for a long period of time, it may have to survive with its lungs almost emptied of air."