To vote in a given precinct, you have to be on their list of registered voters or file a provisional ballot. It's unlikely that the election workers in a given polling location would allow a single person to vote and then file a provisional ballot.
It turns out most people aren't criminals and don't abuse the opportunity to impersonate another voter.