Near the start of the short story "The Wasteland," the unnamed protagonist finds himself in a dangerous circumstance. He has just gotten off his bus in a deserted place on a dark night and sees a group of young men who he is sure are there to mug, or even murder, him. As he grasps his situation, the bus drives away and disappears into the night.
The quotation in question highlights the danger of the situation and emphasize the mood of the scene as the protagonist is experiencing it. The figure of speech used is a simile that compares the bus to "an island of safety" and the wasteland outside as "a sea of perils." This geographical metaphor suggests the provisional safety the bus provides and the danger that otherwise surrounds the protagonist.
A simile is a type of metaphor that uses the words "like" or "as" to compare one thing to something different so as to highlight a particular aspect of it. This type of figure of speech tends to make a description more evocative or vivid. In this particular case, there are two comparisons in a single simile. The bus is compared to a safe island and the wasteland outside is compared to a dangerous sea. Clearly, neither are actually these things, but the figurative language that is employed here emphasizes their meanings for the story's protagonist.