A poll is an election, or a survey of people's opinions. When people go to the polls, they vote.
If you poll your classmates about their favorite foods, you survey them and take note of their opinions — in other words, they each cast a vote. This is also what happens when voters go to the polls, although they're voting for political candidates and their votes are anonymous. The original fourteenth century meaning of poll was "hair on the head" or just "head." This gradually evolved into "person," and the idea of "counting heads."