Through the history of poetry, a metrical foot has meant many different things. Today, with regard to modern poetry in English, a foot is usually thought of as a stressed syllable along with its attendant unstressed syllables. So, in general, a line of poetry contains as many feet as there are stressed syllables.
For example, the Wallace Stevens line,
This single place in which we are and stay,
has five stressed syllables—sing, place, which, are, and stay—which give it five feet.
But this line also shows how a single line might be scanned in different ways. It might be scanned as five iambic feet, but when you read it in a natural voice, the which is not significantly more stressed than in or we, so it would be possible to scan the line as iamb amphibrach anapest iamb or amphibrach dactyl iamb iamb, both of which readings would make it a four-foot line. Ultimately, there’s no correct reading. And since poets generally don’t think about feet as they’re composing their lines, the imposition of feet is merely an after-the-fact analytical tool to help us think about poems, and there may be as many valid readings of a line as there are readers.