There are multiple figures of speech (or literary/poetic devices) used in Robert Frost's poem "Mending Walls."
Alliteration- Alliteration is the repetition of a consonant sound within a line of poetry. For example, in the tongue-twister "Peter Piper picked a peck of pickled peppers," the repetitive sound of the "p" exemplifies alliteration. In the initial line of the poem, alliteration is found.
Something there is that doesn't love a wall.
In this line, the "t," or "th," sound in "there" and "that" is repeated.
Assonance- Assonance is the repetition of a vowel sound within a line of poetry. In the children's game "I Spy," the vowel sound "i" is repeated. Assonance can be found in the third line of the poem.
And spills the upper boulders in the sun.
In this line, the vowel sound "u" in "upper" and "sun" is repeated.
Metaphor- A metaphor is the comparison of two or more things which are typically different. An example of a metaphor is "My life is a roller coaster." Here, the speaker's life is compared to a roller coaster (meaning his or her life is full of ups and downs.) An example of a metaphor can be found in line twenty-four of the poem.
He is all pine and I am apple orchard.
Here, the speaker is comparing his or her neighbor to a pine tree and himself, or herself, to an apple orchard.
Personification- Personification is the giving of human characteristics or traits to non-human/ non-living things. For example, "the sun smiles" is an example of personification given the sun cannot smile, but humans can. Personification can be found in lines twenty-seven and forty-six.
"Good fences make good neighbors."
Here, fences are given the ability to be a good neighbor. Given that only humans can make good neighbors, this shows the personification of the fence.
Other answers to this question have addressed assonance, alliteration, metaphor, personification, apostrophe, and hyperbole, so to round out the answer and examine more subtle or less frequently noticed figures of speech in "Mending Wall," let us consider the following techniques:
When a poet inverts the syntax of a line it is called inversion, or anastrophe; it is often used to control meter, or to provide emphasis. Frost employs it in the opening line, "Something there is that doesn’t love a wall," instead of "there is something that doesn't love a wall.
Frost also employs the use of first person perspective as the speaker relates the narrative in real time, or present tense as the reader and the speaker experience the action of the poem together.
Frost borrows a technique from rhetoric when he arranges two rhetorical questions back-to-back in the lines "Why do they make good neighbors? Isn't it where there are cows?"
Simile is used when the speaker imagines his neighbor "like an old-stone savage armed" building a stone wall.
Finally, in his diction, Frost uses compound nouns such as "frozen ground-swell" and "old-stone-savage." Compound nouns are nouns made up of two or more nouns, sometimes incorporating adjectives.
The first figure of speech is personification, which means talking of inanimate things as though they are people:
Something there is that doesn’t love a wall,
That sends the frozen-ground-swell under it.
This is personification because it presents natural events such as hard freezes in the New England winter as somehow having intent, emotion, and purpose.
Another figure of speech we encounter is alliteration or repetition of consonant sounds, as in the repetition of "w" sounds in the line "was walling in or walling."
We also encounter direct address in the line "Stay where you are until our backs are turned!" In this line, the characters in the poem appear to be speaking to the stones rather than to each other or to the reader.
The poem uses the device of hyperbole or exaggeration in stating that the men nearly have to use a spell to balance the stones. Finally, in listing the many different types of causes of damage to the wall, Frost uses the device of amplification.