In episode 20 of the anime, when Annie, as the Female Titan, falls into Erwin's trap and is restrained, she calls over a horde of titans to devour her titan body. Her titan body is shown to be torn apart and eaten as the titans surround her.
She is next seen in her human form, hiding herself among other people in the squad. When her cover was blown, she turns into her titan form for the second time and eliminates the League of Legends, as seen in episode 21.
How did Annie Leonhart manage to get out of her titan form and escape from the scene, all while surrounded by a horde of titans?