I had a spoiled ballot, first time ever. I marked "Yes" instead of "No", which I meant to mark on one of our propositions. Everything else was fine. When I asked the poll workers, they said I could let that one go through as it was or get a new ballot. I could only mess up one more time. I had to write SPOLIED on it in black marker and then they put it in a big plastic sleeve with about 15 or 20 others.
How does one spolly a ballot? ;-)
Yes, the regulations depend on the state. Here in Florida, you get 3 chances. Each spoiled ballot is folded and marked, and put in a special envelope while the voter watches.
Other states give fewer tries or have slightly different procedures, but in any case, a spoiled ballot is either one that the voter himself brings back, or one that is rejected by the machine because the voter has marked too many boxes (or not marked any).