Ok let me paint the values a few times through loop.
Let's assume first that our switch is wired so a press makes the pin high, since that's what your example implies. Doesn't change the principle though. So it's low most of the time: will need a pull down for that, that's another story. We'll assume that PreviousOnOffSwitchState, when it was declared, was initialised low to match the default position of the button.
So let's say we start with button unpressed. First time through loop, compare old state to new. State was initialised low, it is low, if test fails, do nothing.
Now, and here's a part which you didn't post, there will be a line in the code that puts the current value into the previois value for next time. I'm assuming there is such a line. So, save current as old.
Through loop again, still button not pressed, current and previous are the same (remember that's an updated previous), do nothing.
Now press the button.
Go through loop. Current is high, previous is low, there's a change, if test passes.
Now inside that if, check if it's high. It is, means it went from low to high, ie, a press, so toggle motor. Save current as old, remember thats a high now.
Now and here's the fancy part, the processor is so fast, that you haven't let go the button by the time it loops again.
So let's see if it's changed. Current is high since your finger is slow. Old is high because we just saved it. Changed?- no. Do nothing. (That's where it would accidentally toggle the motor if we didn't do the check, if we just looked for a high, not a change to high). Save current to old, still a high.
Now let go the button.
Loop whizzes round. Check for a change. Current is low (we just let go), old is high. Changed? Yes. Is it high? No. Inner if fails, do nothing. (This was a high to low change, which has no significance. But perhaps in some cases a release also may do some action, program that into an else of the inner if.)
So now we're back where we started, excpet we toggled the motor along the way.
Rinse and repeat.
(Btw, toggling the motor state won't actually toggle the motor: there must be a line you didn't post that does a digitalWrite(pin, motorEnabled); )