A metaphor describes one thing in terms of another so that readers bring some qualities of the second thing to the first. In The hallway was a river of backpacks, the river suggests how students moved together through the hall.

How to recognize it
Look for one thing described through another, directly or through a verb carrying an image.
Examples explained
Two ways to write a metaphor
Make the comparison directly. Her inbox was a waiting room. The waiting room suggests that each message is another person hoping for attention.
Let a verb carry the image. The news rippled through the office. Rippled brings in the motion of water to suggest the way the news spread.
Keep an extended image consistent
An extended metaphor develops the same image across several phrases or sentences. The hallway’s river might slow to a trickle after the bell. A simile can make the comparison explicit with like, while an analogy can explain in more detail how the two things work in similar ways.
Common mix-up
A metaphor need not use is. The news rippled borrows an image through the verb. A simile often makes comparison explicit with like or as.
Quick check
What does “The news rippled through the office” borrow from water?
Reveal the answer and explanation
The image of spreading movement. The news is not literally water; the verb suggests how it travels.