Assonance is a literary device that involves the repetition of vowel sounds within closely positioned words, creating internal rhyming and enhancing the musical quality of language. It is often used in poetry and prose to evoke emotions or emphasize certain themes. For example, the phrase "the rain in Spain" demonstrates assonance through the repetition of the long "a" sound. This technique can help create rhythm and mood in writing.