Metaphors are authorial tools to highlight similarities between two things that cannot be literally compared. Similes are a subset of metaphors that specifically use "like" or "as" to make that comparison.
Consider the following phrase, which contains both a metaphor and a simile:
His room was as black as pitch with the thick darkness . . .
The metaphor is "thick darkness." Darkness can't literally be thick, as could a soup or pudding, but by referencing thickness, Poe emphasizes how impenetrable the black is. The simile is "black as pitch," comparing the darkness of the night with the darkness of sticky tar.
Simple simile and metaphor like the ones above are common across all writing, but authors such as Poe use both tools with sophistication, building mood, character, and plot. Here is another sentence containing both a simile and a metaphor:
When I had waited a long time, very patiently, without hearing him lie down, I resolved to open a little—a very, very little crevice in the lantern. So I opened it—you cannot imagine how stealthily, stealthily—until, at length a simple dim ray, like the thread of the spider, shot from out the crevice and fell full upon the vulture eye.
The metaphor is the "vulture eye," which describes the eye of the old man that the narrator seeks to murder. Describing his eye as a vulture's does not mean that the old man literally has eyes transplanted from a vulture, nor does it imply any physical resemblance in color, size, or shape. Rather, the phrase references the traits commonly associated with vultures: cruelty, opportunism, and enjoyment of death and decay.
The simile is "like the thread of a spider." Here, the comparison is more direct but still not literal. By saying that the beam of his lantern is "like" a spiderweb, he is emphasizing its thinness and fragility, although it is almost certainly not literally that narrow. However, he's also comparing himself to an animal, contrasting the scavenging vulture with his own spider-like patience as a hunter.