I thought the corpse helped provide him use of his legs midway through the series. However, the entire corpse is taken by Valentine near the end and sealed in the vault, so how is Johnny Joestar still walking?
It's in D4C at the end of that arc, when Gyro uses Scan to find where in the sewer Johnny was hiding after being shot. He tells Gyro he was able to move his legs but didn't have the strength to stand yet, and Gyro then tells him how to use the stirrups on a horse to further enhance the spin since it doesn't take much strength to do, he just needs control.
He then admits when he's about to board the ship that he'd been building his leg strength up ever since discovering Act 3, and had just barely gotten to the point where he could and walk with some difficulty by the time he was boarding the ship at the end. And was somewhat disappointed that it was so slow and mundane, rather then a suddenly miracle.
As for the mechanics of how. He learned how to use the Spin to transfer nerve signals around the damage in his spine and into his legs, by-passing the issue, though it took time to build his leg strength back up to take advantage of it.
He says himself that he was slowly being able to walk more and more as time went on, but didn't tell anyone.
We can assume that he was actually able to stand for a few days or weeks before the events of the final battle... and simply chose not to for moral and ethical reasons, as he didn't feel he was good enough yet.