Here's why:
* Simile: Uses "like" or "as" to compare two things. Example: "The pencil moved *like* a dancer across the paper."
* Metaphor: Directly states that one thing *is* another thing, without using "like" or "as." Example: "The pencil *danced* across the paper." This implies the pencil's movement is graceful and flowing, like a dance.
So, "danced" is used figuratively to describe the pencil's movement, making it a metaphor.