As your acceleration comes from the rear wheels, there is a prerequisite that one of them must be able to touch the track in order to recover from these situations. However, it is possible in most cases. Note that I am using "inwards" to refer to "aligning with the edge" and "outwards" to refer to "perpendicular to the edge; towards the track".
One front wheel outside: If it's not very far off-track and your angle is somewhat sharp, you can simply steer towards the track and accelerate. Be careful not to allow a rear wheel go off-track. If you are almost perpendicular to the edge or the wheel is far off, you will need to steer inwards and reverse. Going forward just a bit to allow more room for reversing can help greatly.
One rear wheel outside: Steer inwards and apply light acceleration. Once the car has a roughly 30~60 degree angle to the edge and a bit of momentum, you can start steering towards the track and accelerate more to pull the wheel back in.
One front wheel and one rear wheel outside, same side: A common case in RPG tracks; to move forward, the key is to apply light, continuous acceleration while doing slight nudges towards the track. This will keep the off-track wheels close and help with balancing. To get a front wheel back on track, let go of the acceleration until the rear wheel is almost off-track, then steer outwards and accelerate.
One front wheel and one rear wheel outside, different sides: Also a common case in RPG tracks, where you are balancing on a very thin area and are diagonally on the track. Keeping your balance is of utmost importance, as you usually can't have more than two wheels on the track in these situations. There is no real trick to this one; be patient and keep it slow, have an extremely steady speed and slightly adjust your direction when the car starts to tilt on one side or another. Another strategy is to just go fast and hope for the best; while it sometimes works, your mileage might vary.
Two front wheels outside, perpendicular to edge: This is a tricky one. The idea is that you should try to align the car with the edge and then get one of the front wheels inside the track. However, moving forwards too much will tip the balance and cause the car to fall off. Instead, moving small amounts forwards and backwards repeatedly while steering appropriately will allow you to turn the car and build up momentum. Using the momentum, it is then possible to move backwards fast enough to pull up one of the wheels. You should be in a roughly 20~40 degree angle from the edge when finally pulling back. From there, stopping and then reversing should bring the other wheel in.
Two rear wheels outside, perpendicular to edge: If they are touching the track, depending on the surface you might be able to accelerate, do a sharp nudge to the side, and then get the slightest amount of traction. Continuing at full acceleration, this momentum will allow you to pull one of the rear wheels back on track by turning inwards and then straightening the car.
If they are not quite but almost touching the track, it can still be possible to tilt the car slightly to the side by steering and switching between acceleration/breaking, which might result in a touch with the track, providing some momentum. However, it is very position-dependant and will tip the car off-track at the slightest error. Any further out, and you will not be able to move at all. The position in your picture still looks very saveable to me, although it would be easier if the track's wall wasn't so close.
Three wheels outside: If you have existing momentum forwards and a wall to push against, it is usually possible to recover from this; needless to say, it is most likely not going to happen otherwise.
Four wheels outside: Hit the reset button quickly to avoid losing any time!