A poem's meter determines the poem's rhythm. Meter is the pattern and number of stressed and unstressed syllables in each of the poem's lines. Each time the meter's pattern is completed within in a line, it's called a "foot." The stress pattern and the length of a foot of a poem's meter gives the poem its pulse --- and that pulse is what we hear as the poem's rhythm. Poems are divided into types based on what type of meter each uses.
Rhythm and Meter Within Feet
Disyllabic meter contains two syllables per foot. Common types are iambic and trochaic. Iambic meter is an unstressed syllable, then a stressed syllable. Trochaic meter is a stressed syllable, then an unstressed syllable. Trisyllabic meter contains three syllables per foot. Common types are anapaestic and dactylic. Anapaestic meter is two unstressed syllables, then one stressed syllable. Dactylic is one stressed syllable, then two unstressed syllables. Meter that goes from stressed to unstressed is considered "falling," and meter that goes from unstressed to stressed is considered "rising."
Rhythm and Meter Within Lines
The meter of a line is largely determined by how many feet are contained within each line. A line with two feet is dimeter; a line with three feet is trimeter; a line with four feet is tetrameter; a line with five feet is pentameter; and a line with six feet is hexameter.
Rhythm and Meter Within Stanzas
A stanza's rhyme scheme is usually determined by the lines' last syllables. In notation, when a line's last syllable rhymes with the last syllable of another line, they are labeled with the same lowercase letter. For example, in a couplet, the last two syllables of a pair of lines rhyme with each other. Therefore the couplet is labeled as following an "aa" or "bb" (or so on) rhyme scheme. A stanza with two lines is a couplet, and a stanza with four lines is a quatrain. Ballads, Petrarchan sonnets, Shakespearean sonnets and other types of codified poetry forms have set numbers of lines in each stanza and each stanza has a set rhyme scheme.
The two most common types of feet in classical meter are spondee, which has two syllables placed together within the foot that are "heavy" or stressed, and pyrrhic, which has two syllables placed together within the foot that sound "light" or unstressed. In classical meter, the number of stressed syllables in a line stays constant with the other lines in the poem's stanza, but the placement of those stresses within the lines may vary. Therefore, the foot length isn't as useful in determining the poem's rhythm type as is counting the number of "beats" within each line as a whole.
Sprung rhythm is when the number of unstressed syllables in a line varies, but the number of stressed syllables stays constant throughout the poem's stanza. As with classical meter, sprung rhythm feet are difficult to determine, because the emphasis in the poem's rhythm is on the number of stressed beats per line, not in the pattern those stresses follow otherwise. Therefore, to determine if a poem is written in a sprung rhythm, it's more useful to look at each line as a whole and to count the stressed and unstressed syllables within it.