Take the pointed end of a hoof pick and hold the pressure on a spot (say the hip, shoulder or barrel) and keep the pressure there until they move away from the pressure instead of leaning into it. You can use a verbal cue like "over." As soon as they shift their weight away from the pressure, even just a tad, release the pressure. Tell them how good they are and how proud you are! Try again.
Eventually you should be able to do this with the light press of a finger and your verbal cue. And they should move as many steps away as you want. But it all starts with one.
You can try starting with the finger if you wish, but if they really ARE leaning into pressure, your finger will loose, lol! So something pokey but not sharp like a dull hoof pick works great. That is how I taught my mare to side-pass from the ground. I got her moving "over" with a press into the barrel. Then under saddle I used my heel. Worked really great because even though she was "broke" when I got her, she didn't move off of leg pressure and she would back up instead of moving side ways if you tried. So it was a lot less stressful for both of us just to teach her to move over from the ground first.
I was able to teach my foal the same way just using finger pressure.
I do this to their chest (and say "back") for backing up, and I say "over" if I want them to move the hip, shoulder or barrel. The barrel is a bit harder than moving either the hips or shoulder, so I would start with the easier maneuvers like hips and shoulders. But in theory the horse should give to pressure on any part of his body. And you can do this to the top of the poll too to get him to drop his head (just use a finger, not a hoof pick for that).
I usually practice them swinging their hips over when they are tied. Then the horse really can't go anywhere, except to swing their hips over, which is what you want anyway. Makes grooming more enjoyable when you can move the horse around where you want them too.