It's based on relativity, which states that the faster you go, the slower time moves for you. As you approach the speed of light, time for you slows to a crawl.
Theoretically, if you managed to move faster than light (this would take an infinite amount of energy), you would (sort of) find yourself moving backwards in time. In fact, it's theoretically possible that there is another half of the universe coexisting with ours which is kind of mirror imaged with ours. That is, it would be made up of particles (named tachyons) which always moved faster than light, and which would require an infinite amount of energy to slow down. We wouldn't be able to detect them, however, because we wouldn't be able to interact with them.
Anyway... Silver Age comic books took this little tidbit and applied it to people like Superman and the Flash. It was not uncommon for them to move so fast that they broke though "the time barrier" and could thus travel through time. It was a well-established bit of comic book pseudo-science, which even showed up in the old Superfriends cartoons. The Chris Reeve movies were based on the Silver Age comics, so they basically took it for granted that he could do that.
So, yeah... He moves faster and faster. Time slows down, which appears to him as the Earth slowing. Then time begins to move backwards, which appears as the Earth moving backwards. We see the dam "mend" itself because time is "rewinding" for him. He's flying back in time to a point before the dam burst.
And yes, this means that, for a while, I believe that means that he was in two places at once. He stopped the missile, saved the people from the burst dam, etc. Then he went back in time, saved Lois, too, and relived the intervening span. He took the thread of his life and looped it back so that it was doubled for a brief span. Which is dangerous for a variety of reasons (including dramatic ones - if he can go back in time to fix any mistakes he makes, how do you present a credible plot challenge?), which is why we hear Jor-El telling him that what he's attempting is forbidden.
Paul