Person goes to the wrong polling place: he's registered to vote in the county, but either the polling place moved, or he got incorrect information, so he's not on the voter list. He votes on a provisional ballot, someone in the county registrar's office checks the name and address the next day and his ballot is put in the pile for the right location.
Person goes to her polling place, finds she's not on the list, but swears she sent in her registration form by the deadline. She gets a provisional ballot, and a couple of days later a clerk finds her registration form - with the correct postmark date - had been delayed in the mail. Her ballot gets counted.
Person goes to his polling place, swears he's a NPP voter and says someone must have tampered with his registration since he now shows as AIP but he wants to vote for a Democrat. He's given a provisional ballot, but later the registrar's office finds his original registration with American Independent Party checked. His presidential primary vote at least is not accepted.
Person goes to her polling place and the poll worker tells her she was sent an mail ballot but she says she never got it. She's an NPP voter and wants a Democratic ballot. Later the registrar finds her original with her signature on the envelope, indicating she's already sent in a valid ballot: her new vote is discarded and the original ballot is counted.
Brand new voter shows up for the first time after registering at the DMV and is asked for identification (in California, this may be done the first time one votes) and doesn't have any. He's given a provisional ballot, and later it's determined that yes, his signature matches that from the DMV so his ballot is counted.
And there are probably other reasons I can't think of at the moment. A provisional ballot is used to fix problems that come up at the polling places so people higher up the chain can resolve them later. Remember - no matter what the media like to rush on the air, the election isn't officially over until the county registrars and the Secretary of State certify the results.