Many posters have provided great suggestions and I incorporate similar methods frequently. What works for me depends on the cause of the problem. Assuming it’s not a physical issue such yanking their back out or teeth needing to be done, contributing factors could be due to rider and/or the horse.
IME it’s easier to ride a horse both straight and on a bending line if they’re using themselves properly. But if I lock or drop one of my hips, the horse tattles. If I use my outside hand inappropriately, they tattle. If I have trouble sorting it out, I might use a checklist similar to CBoylen’s. That may mean I have to pull my stirrups to rule out my crookedness. Or for a horse with plenty of strength and ample training, work “long and low” to make sure the horse is working appropriately. (To me that means loosen up any tightness in the back to so it’s easier to lift the back, make sure there’s sufficient impulsion, they’re reaching for the bit, working inside leg to outside rein, etc.)
Then I go back and try again. I want my horse driving from the HQ through the back and up through the shoulder. So if I want “more” when on a circle, I apply a little inside leg, the horse should give more power, lift the rib cage, and the bend (and energy) is subtly controlled by the hand. If I’m still getting a flashing red light, then I do more trouble shooting.
As already mentioned by others, this requires strength from both horse and rider. And if one or both could use improvement, it’s like anything else, build it in steps. Some horses and people build muscle and endurance quickly, others more slowly. And if there are training holes, address them (as you’re trying to do).
Let us know of your progress. It’s an incredible feeling when things when things start to click. Happy riding!