The term assonance has two distinct but related meanings.
The original meaning was a similarity or identity of vowel sounds at the end of a line of verse. The similarity would be in the final accented syllable, and, if there were unstressed syllables following, in those also. It was generally used in Old French (e g La Chanson de Roland). Assonance in this sense is an imperfect rhyme of a particular type.
The term is now more usually used of any closely associated repetition of vowel sounds, more frequently in verse, but sometimes in prose. In verse it can occur anywhere in the line. If the closing consonants are also repeated, then it is considered to be rhyme or internal rhyme.