When you are having sex and the rhythm is just starting to get good, and the dick falls out. You have to put it in again and start the rhythm all over again.
For this reason, the term can also be used when something was great and turned shitty in a minute. Or you thought you had something and it was ripped out of your grasp at the last second!
Turns out he didn't win the tickets after going to the box office to pick them up!