When you register to vote, you are asked to state that you are a US citizen and indicate if you are currently registered to vote in another town/city. If you are registered elsewhere, the new town then notifies the old town that you are now registered in the new town and should be removed from the voting roll of the old town. (This system seems quite archaic, but that's what it is)
But there are always questions about our voting system here which is why some people think we should have some kind of voter identification system--as it is right now, when I go to vote in any election, I walk into the voting place and talk to the election ladies who sit behind a table checking off peoples' names as they come in to vote. They ask me first my address: street and number. Then they ask me my name. I answer them verbally; no papers or identification card is shown. They hand me a ballot, which I fill out at a little desk. When I am done, I take it to another group of election ladies at the back of the room and again tell them my address, then name, which they too check off. I then insert my ballot into the counting machine under the watchful eye of the police officer. There is another cop somewhere around the front door too. And that is it. And, by the way, neither the election ladies, nor the police officers know me.
One problem that has come up locally is that a couple of well known public figures participated in and voted in their "hometown" local elections, yet they allegedly lived in another city. In one case, the individual owned an apartment in the town where he voted, but apparently had not lived there for years. But, presumably, in those cases, the individuals only voted as a "resident" in one hometown, not two. This doesn't really matter in national or even state elections, but it could matter in a local election.
One safeguard is the fact that registration and voting is a public act, so a person's voting record is accessible and can be questioned. (Your actual choice is not known, but your party affiliation, if any, and the fact that you voted is known.)
In at least some cities, there is another safeguard which is the local census which is sent out once a year, which you are supposed to sign as head of household to account for all the family members, and any dogs, living under your roof, under threat of removal from the voting rolls.
The system is far from perfect, and there have certainly been accusations over the years of various kinds of cheating, dead people voting, etc.
Again, the system here is crazy. Every state has different voter registration requirements and processes (though there are some Constitutionally mandated guarantees--states can no longer prohibit women from voting for example). One lesson of Bush vs. Gore in 2000 was that the Supreme Court said the states are in charge of the voting results in their own state, and if the State of Florida says Bush won the state of Florida, Bush won there, period. Whether or not election officials can be certain that none of the Florida voters voted in other states ultimately doesn't matter.