There are many different examples of figures of speech (or literary/poetic devices) used in Edna St. Vincent Millay's sonnet "Thou are not lovelier than lilacs."
Alliteration is the repetition of a vowel within a line of poetry.
An example of alliteration is found in the initial line of the sonnet.
Thou art not lovelier than lilacs,--no,
In this line the "l" sound in both lovelier and lilacs is repeated.
Assonance is the repetition of a vowel sound within a line of poetry. An example of assonance is found in the fifth line of the sonnet.
From left to right, not knowing where to go,
Here, the "o" sound repeats in both knowing and go.
A metaphor is a comparison between two (or more) typically unlike things (not to be confused with a simile which is also a comparison but uses "like" or "as" to make the comparison).
This poem exists as an extended metaphor. The comparison of the person/object the narrator is speaking about is being compared to (or contrasted to in order to show what the person/object is not) many things over the course of the poem.