That would happen if you didn't load it right .
The first bit of film was exposed to the light when the back was open , every exposure you made was to the same piece if film as it never wound on .
When you load a film , as you start to advance it on ( to get the film counter on number 1 ) , watch the film rewind knob .
It should also be turning when the film is being pulled out of the cassette .
If it doesn't move when you move the film winder lever , nothings coming out and you need to start again .
The other thing to do to check when you think your good to go is to just turn the rewind knob back , once you've taken up the slack in the spool it will stop .
If the leader hadn't been wound onto the take up spool , it will carry on with no tension untill it goes back in the cassette .
( You would feel the film leave the pressure plate so you can stop winding before the film disapeare's back into the cassette .)
The only other reason film comes back like that is if you used a rangefinder camera ( rather than an SLR) and didn't take the lens cap off !