Jaques's famous speech from As You Like It (Act 2, Scene 7):
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances,
And one man in his time plays many parts,
His acts being seven ages.
This is a metaphor—specifically an extended metaphor (or conceit). It systematically maps theatrical concepts onto human life:
The metaphor unfolds across the full speech, each line extending the comparison. It's one of literature's most enduring images of the human condition as performance.