Start already in balance with the front wheel up onto some edge or kerb
1° From there, flex down on the bike as much as you can, like a spring before the impulse. Keep the brakes full-on all the time.
2° Full extension in one hop, pushing on the legs but also with the arms to boost your impulse on the bars (with support from the front wheel).
3° To follow up with the impulse, you should pull on the bars to lift the bike forward, while tucking up the knees to let the bike go up.
The best places to practice are stairways, or small wood logs. To boost the impulse, really try to bounce back from your flexion by using the spring of both your legs and arms (and low pressure bouncing tyres). When you get the right move, you can land directly on the rear wheel one step higher. In difficult situations, you can even try to combine it with a pedal kick at the very end of the impulse, to give it a boost.
If the obstacle is wide enough for both wheels, just roll over by pulling on the bars after the extension, and then pushing the bike in front of you. That is smoother than pulling up the whole bike in the air (for nothing) and it is less physical. But if you feel like it, land directly on the rear wheel, with the front wheel in the air. A precise wheel transfer is the only exit option if you have hooked the front wheel to an edge, with the rest of the bike hanging against the obstacle. Nearly all the impulse is on the front wheel, so make sure it is well hooked, or else it will slip off.
At a Pro level: pushing the move further
Experienced riders are able to run this technique with amazing precision, on sharp edges, slanted corners and other slippery stuff where any miscalculation could result in a nasty crash. Concentration is decisive, especially when the ground is far below you.