Once you are ready to start training, you will need to stand next to the stairs/ramp and use your hand to encourage your dog to go up, most dogs will naturally use the stairs/ramp, you can use treats to entice them to go up and down the stairs.
Every time your dog goes up or down the stairs/ramp, be sure to praise them and give them a treat.
For dogs that aren't quick on the stairs/ramps, you can put a leash on to block the other lines with cushions or fences, then easily guide them up and down the stairs/ramps with treats and encouragement again when the journey is complete.
Make sure not to force or drag them up the ramp, the leash is for gentle guidance only.
Once your dog is comfortable using the ramp and has achieved several rewards for the journey up and down, 5-10 repetitions per day may be all you need to train this behavior if your dog goes around the ramp at any time then block the alternate route again and guide the dog up and down the pet ladder.
Only persistent training and patience can make the dog accustomed to using stairs and strengthen the health of the dog's legs.