Let's look at the first stanza, shown below. I will put each accented syllable in bold and separate one metrical foot from another with a "|" symbol:
Ma ca | vi ty's | a Mys | te ry Cat | he's called | the Hid |den Paw—
For he's | the mas | ter cri | mi nal | who can | de fy | the Law.
He's the baf | fle ment | of Scot | land Yard | the Fly | ing Squad's | des pair
For when | they reach | the scene | of crime | Ma ca | vi ty's | not there!
The predominant, or most common, metrical foot here is the iamb. An iamb has two syllables: one unaccented (or unstressed) syllable followed by one accented (or stressed) syllable. In addition, there are seven feet, typically iambs—though there are occasional substitutions of other types of feet—so this means that the poem's meter is iambic heptameter. The word iambic refers to the dominant foot used, and the word heptameter refers to the fact that there are seven feet per line.
If you look at the fourth foot on the first line ("te ry Cat") and the first foot on the third line ("He's the baf"), you will see examples of metrical substitution: a different foot called an anapest is substituted in these positions for the iamb. An anapest is a foot with three syllables, two unaccented (or unstressed) syllables followed by one accented (or stressed) syllable. However, because these anapests are the exception to the iambic rule, we would still refer to the meter of the poem as iambic heptameter.