You enter all your choices on the machine, then the machine spits out a piece of paper, and the paper itself is your voting record. You verify that it is correct before it goes into the ballot box.
Nothing's perfect, but this doesn't seem to have any weaknesses that existing paper ballots don't, and it gets rid of a few. It has potential to greatly reduce ballot problems, both crap like hanging chads, "voter used an X mark instead of filling in the circle", and real errors like overvoting. Software shenanigans are almost pointless, because the piece of paper is the vote record, and the voter checks it.*
Machines can also be more usable for people with input/output difficulties (poor eyesight, motor control, whatever).
---
*I say "almost" because we all know that plenty of people won't check it. Vision problems are also a concern here, but not any more so than with plain paper.