Poetic meter is the rhythm of poetry. To determine meter, we look at two things: the number of syllables and the way certain syllables are stressed within each line. Often, those stressed syllables fall into a pattern, and we can thus label lines of poetry by examining those patterns.
Let's look at the first line of "To His Coy Mistress":
Had we but world enough and time,
There are eight syllables in this line, and we can divide those eight syllables into pairs. The | is used to designate how those pairs can be visually represented:
Had we | but world | enough | and time,
Note that "enough" is two syllables itself, which is important to note as we remember not to count words but syllables. We call each of those pairs a metrical foot. This line has four feet, so we can thus label the line tetrameter, tetra- being the prefix for four.
Let's look at the line again and determine which word in each pair is stressed. Sometimes, that's easy when you have one word that has two syllables, like "enough." We stress the second syllable in that word. Generally speaking, we don't stress articles, modifiers, and conjunctions as much as we stress nouns and main verbs, though there are exceptions to this. If you read this line aloud, you'll begin to hear those patterns of stress (stressed syllables are is italicized):
Had we | but world | en-ough | and time,
Each foot here is an iamb—an unstressed syllable followed by a stressed syllable. Thus, this line is an example of iambic tetrameter. In other words, the poem contains four iambs per line.
Upon examining subsequent lines, you'll see that generally speaking, the lines fall into this pattern of iambic tetrameter. There are some lines which present variations or substitutions, which poets commonly include to produce certain metrical effects. You can then examine those lines to determine why the poet might have deviated from the established meter.