Music and poetry have been connected throughout history, and that is evident when you read any song lyrics--they are written in poem form. Both art forms also utilize choruses, stanzas, and repetition. As the above answer indicates, the "music of poetry" traditionally refers to elements of a poem other than the actual words; however, words also contain musicality, as you shall see below.
How a poem sounds is its music, and the easiest place to hear it is in the rhythm of a poem. Each metered poem has a cadence which is musical; however, sound in this sense refers not only to rhythm and meter (though certainly these are elements of sound) but also to the actual sounds of the words. This can be heard in alliteration (Poe's "while I nodded, nearly napping"), of course, but it can also be heard in the sound of the words as poetry is being read aloud.
Read aloud these lines from Alexander Pope's poem "An Essay on Criticism" and give special attention to the second and fourth lines.
A needless Alexandrine ends the song,
That, like a wounded snake, drags its slow length along.
Leave such to tune their own dull rhymes, and know
What's roundly smooth, or languishingly slow....
It is impossible to read those two lines quickly because of Pope's word choice, and of course the sound of the words matches the meaning of the lines. The sound part of this phenomenon is an example of the music of poetry. "Languishingly slow" is beautiful music.
Rhythm (the pattern of stressed and unstressed syllables) in a poem is like the melody in music; though words are essential to meaning, the poet's syntax (word choice) is also part of a poem's music. This musicality is what makes reading poetry aloud a much more satisfying experience than simply reading words on a page.
could be factors like, rhyme, rythym and things like that. Not the meaning of the poem, the sound techniques and so-on.
If you need any other help with poetry, I am williing to help you and will immediatly answer any messages withh helpful feedback and examples.