“Despair,” or “desperation,” is a sad, scary, dangerous, or hopeless situation. And when you’re in despair, you’re desperate: you're scared, uncomfortable, or in danger, and you need something very badly--and you’ll do anything to get it.
This girl is desperate for help. She's desperate to get inside the building. She's very scared of something outside that could hurt her.
Sometimes people say, "Desperate times call for desperate measures." That means, "When the situation is extremely bad, you have to do something extremely bad: something crazy, different, or dangerous." For example, if you're desperately hungry, you might steal someone else's food.