If I'm guessing correctly, that happens when you Press Z and tries to walk backwards. Try pressing Z again, and orbiting the mouse. Also see if the Free camera mode is not activated (look for an Eye on your right screen), if it is, try pressing F3 twice or Alt once. Also pressing F5 tends to fix random things happening with the camera