This poem is in the standard Habbie stanza, a six-line stanza which rhymes aaabab, which is to say that the first three lines end-rhyme, then there is a new rhyme for the fourth line, then the rhyme of the first three lines is repeated, and the last line rhymes with the fourth. This form was not invented by Robert Burns, though it has come to be known as the "Burns Stanza".
In addition to the rhyme scheme there is a set pattern for the number of stresses per line. The first three lines (the "a" rhymes) are four syllables. The fourth line (the first "b" rhyme) is two syllables. The fifth line (another "a") is four syllables again, and the last line (a "b") is two syllables. The number of unstressed syllables between the stressed syllables can vary. Also, it is sometimes possible to read the lines with less or more than the exact prescribed number of syllables, for regional variations in dialect (and changes in language over time) can produce differences in what syllables sound stressed or unstressed. It is safe to say, however, that most people would read Burns' first stanza something like this:
Wee, sleeket, cowrin, tim'rous beastie,
Oh, what a panic's in thy breastie!
Thou need na start awa sae hasty
Wi' bickerin brattle!
I wad be laith to rin an' chase thee
Wi' murd'ring pattle!
This poetic form differs from, say, the iambic pentameter of Shakespeare's sonnets. The pattern of stresses does not have to follow an xX (unstressed-stressed) pattern, but rather the number of stresses in the line is more important than the pattern they form. This creates variation within a regular form of verse, and gives flexibility to the poet to highlight certain words in a line for emphasis. The first line, for example, might normally be read with the first word "Wee" being stressed, but the rhythm of the line demands the opposite. Then the second line is almost the reverse of the first, with the first word "Oh" being stressed, conjuring up the image of the plowman exclaiming loudly in distress at upturning the poor mouse. There is a similar stress on the first syllable of "panic", which highlights the emotion of the creature.
The standard Habbie is technicaly a kind of podic verse, which means it lies somewhere in between accentual-syllabic verse, in which the unstressed and the stressed syllables all count (such as iambic pentameter), and strictly accentual verse in which only the stressed syllables count (such as the meter of the poem Beowulf). This means that most of the time the unstressed syllables will follow a regular pattern, falling in a somewhat predictable pattern between the stressed syllables (such as in line 3, above), but there is an allowance for extra (or fewer) unstressed syllables to appear, or not, in a line (such as line 2). This gives the poet wonderful flexibility, and makes the poems written in this meter song-like and memorable. This delightful variety Burns puts to good use.
Source: Shipley, Joseph T. Dictionary of World Literature. Totowa, NJ: Littlefield, Adams & Co., 1968.