The pattern of rhymes at the ending of each line in a poem is called a rhyme scheme. Letters (A,B,C...) are usually used to express which lines rhyme. Verses that are designated with the same letter are said to rhyme with each other. It is also known as an arrangement of rhymes in a stanza or a poem.
For easier understanding of the concept, let us take a famous nursery rhyme, written by Jane Taylor as an example.
Twinkle twinkle little star,
How I wonder what you are.
Up above the world so high
Like a diamond in the sky.

We see that the first two lines rhyme with each other (star-are); the second two lines rhyme with each other (high-sky). Let us name each line as  A, B  depending on the words that rhyme with each other.
Twinkle twinkle little star,A
How I wonder what you are.A
Up above the world so highB
Like a diamond in the sky.B
It can thus be seen that this poem follows AABB pattern.
Rhyme scheme of the poem "The Spider and the Fly":
“Will you walk into my parlour?” said the Spider to the Fly,A
“Tis the prettiest little parlour that ever you did spy;A
The way into my parlour is up a winding stair,B
And I’ve many curious things to show when you are there.”B
“Oh no, no,” said the little Fly, “to ask me is in vain,C
For who goes up your winding stairB
can never come down again.”C
“I’m sure you must be weary, dear, with soaring up so high;A
Will you rest upon my little bed?” said the Spider to the Fly.A
“There are pretty curtains drawn around; the sheets are fine and thin,B
And if you like to rest awhile, I’ll snugly tuck you in!”B
“Oh no, no,” said the little Fly, “for I’ve often heard it said,C
They never, never wake again, who sleep upon your bed!”C
Said the cunning Spider to the Fly, “Dear friend what can I do,A
To prove the warm affection I’ve always felt for you?A
I have within my pantry, good store of all that’s nice;B
I’m sure you’re very welcome — will you please to take a slice?”B
“Oh no, no,” said the little Fly, “kind Sir, that cannot be,C
I’ve heard what’s in your pantry, and I do not wish to see!”C
“Sweet creature!” said the Spider, “you’re witty and you’re wise,A
How handsome are your gauzy wings, how brilliant are your eyes!A
I’ve a little looking-glass upon my parlour shelf,B
If you’ll step in one moment, dear, you shall behold yourself.”B
“I thank you, gentle sir,” she said, “for what you’re pleased to say,C
And bidding you good morning now, I’ll call another day.”C
The Spider turned him round about, and went into his den,A
For well he knew the silly Fly would soon come back again:A
So he wove a subtle web, in a little corner sly,B
And set his table ready, to dine upon the Fly.B
Then he came out to his door again, and merrily did sing,C
“Come hither, hither, pretty Fly, with the pearl and silver wing;C
Your robes are green and purple — there’s a crest upon your head;D
Your eyes are like the diamond bright, but mine are dull as lead!”D
Alas, alas! how very soon this silly little Fly,A
Hearing his wily, flattering words, came slowly flitting by;A
With buzzing wings she hung aloft, then near and nearer drew,B
Thinking only of her brilliant eyes, and green and purple hue —B
Thinking only of her crested head — poor foolish thing!C
At last,A
Up jumped the cunning Spider, and fiercely held her fast.A
He dragged her up his winding stair, into his dismal den,B
Within his little parlour — but she ne’er came out again!B
And now dear little children, who may this story read,C
To idle, silly flattering words, I pray you ne’er give heed:C
Unto an evil counsellor, close heart and ear and eye,D
And take a lesson from this tale, of the Spider and the FlyD
The rhyme scheme of the poem "The Spider and the Fly" is "AABBCC", and in the last two stanzas it is "AABBCCDD".