The "thrown out" feeling is the body's emergency response to the situation "this joint has been forced beyond its range of motion! It's unstable and needs to be stopped now!" It activates all kinds of muscles with the goal of shutting down movement. But it doesn't work: the original feeling of instability was caused by the body not being able to stabilize normally, and muscle spasms don't help. Three reasons for the unstable feeling:
- The muscles that normally stabilize the joint are inhibited. Nerve signals don't reach them due to disuse, with bigger muscles inefficiently taking up the slack.
- The muscles that normally stabilize the joint are overworked. Poor posture has left them permanently lengthened, or compensating for weakness in other muscles has left them so tight that they have little room to contract further.
- The nerve signals reaching the brain are erroneous. An old injury stimulated the nerves that carry pain to the brain so often that they fire chronically, or nerve signals carrying pain signals from one area are interpreted by the brain as coming from another area (referred pain).
Because of this, the kind of exercises that help are those that a) restore normal bodily function, or b) rebuild nerve connections between the brain and the body.
For restoring normal function, you're looking at mobility exercises and basic movement patterns. For my upper back, that meant lower trapezius and serratus muscle training, and learning thoracic mobility. For my lower back, that meant learning proper form for deadlifts, Romanian deadlifts, and squats, then using them to identify weak points. Those weak points were generally addressed by learning about muscles that act on the hips and pelvis, such as the gluteus medius.
For rebuilding nerve connections, you're looking at stretching, massage, and isolation exercises. Stretching is for the case when the brain is wrong and the source of the pain is not there any more. By moving the joint through its range of motion without pain, the brain learns the movement is safe. Isolation exercises are for finding movements you're shaky on, can't do at all, or do wrong, like raising your leg with overactive hip flexors instead of the iliopsoas. Repeating the exercise reinforces the nerve connection so that your body will recruit that muscle when needed, instead of compensating with others. Massage is for stimulating the nerves and blood flow enough that the brain can get a signal to and from the muscle and begin to re-establish the mind-muscle connection.
Walking also helps a lot. Good luck!