"Kubla Khan" by Samuel Taylor Coleridge is a poem in which the speaker has a vision primarily of a mystical place called Xanadu, the "pleasure dome" of the ruthless warrior, Kubla Khan. Because the poem is essentially description, it is not surprising to discover that the work is replete with figurative language, including similes and metaphors.
A metaphor is
a figure of speech in which a word or phrase is applied to a person, idea, or object to which it is not literally applicable. It is an implied analogy or unstated comparison which imaginatively identifies one thing with another.
In this poem, the metaphors are a little more difficult to find and understand. One of them is the "lifeless ocean" into which the five rivers in Xanadu flow. While this is an imaginative poem and the pleasure dome is described as being hauntingly beautiful, there is an end to the pleasure and the beauty, and that is the ocean. The rivers "sink in tumult" into the ocean. Each living, flowing river ends its individual life and begin another, as part of a lifeless collective represented by the ocean.
In a larger sense, the final stanza is a grand metaphor for what happened to Coleridge in the course of writing this poem. He was reading and smoking opium, as was his habit, apparently, and he fell asleep. After he woke up, he captured the dream/vision he had in that drug-induced sleep in this poem--until he was interrupted. Though he intended to go back and add to the poem, he never did. The final stanza of the poem is a reflection of that interruption, an abrupt departure from his description of the pleasure dome and a kind of quick summary of the end of his vision. Her singing about a place called Mount Abora is a metaphor for his own desire to finish his own vision.
Could I revive within me
Her symphony and song....
He wishes he could resurrect ("revive") his vision and sing it (write it) for all to hear.
A simile, of course, is
a figure of speech in which two things, essentially different but thought to be alike in one or more respects, are compared using “like,” “as,” “as if,” or “such."
In this poem about an imaginary place, the speaker often describes what he sees in terms of things we already understand, know, or can imagine. For example:
And from this chasm, with ceaseless turmoil seething,
As if this earth in fast thick pants were breathing,
A mighty fountain momently was forced:
Amid whose swift half-intermitted burst
Huge fragments vaulted like rebounding hail,
Or chaffy grain beneath the thresher's flail.
This description is of a fountain which he can only describe by comparing it to several things with which we have some sense of familiarity. He compares the water that is spewing from the chasm to great breath being forcefully expelled from of someone wearing constricting clothing; after it rises from the chasm, the great gobbets of water land on the ground like giant chunks of hail that fall from the sky or kernels of grain which thud to the ground when they are being harvested.
He also uses a simile to compare the haunting savagery of this place with the image of a "woman wailing for her demon-lover" under the light of a "waning moon." While we have probably not experienced this sight, it is something we can imagine and therefore apply to the feeling the speaker wants us to have about this place.
The strongest kind of figurative language in this poem is imagery; however, Coleridge does use metaphor and simile, as well.