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.