The idea is to build enough momentum with a fast approach (such as a bunny hop or a pedal up) and lift the bike just high enough to place your front wheel over the edge of the obstacle (1st step).
Then you combine your momentum with a weight transfer to level up the bike (2nd step) and roll over the front wheel or finish with a wheel-swap.

This technique works best with long frame geometries, making the "hook" easier as the bike "wraps" the obstacle better. Practise on sloping walls or rounded rocks before you try
this out on truly vertical obstacles.

Launch a fast bunny hop or a pedal up to build momentum, aiming the front wheel just above the upper edge of the obstacle. Land with both brakes locked and stay supple to avoid a full rigid stop
when you slam your tyres on the obstacle, flex progressively against the bike to keep your shoulders moving forward.

The front wheel is hooked like in a static hop, but you have extra momentum
on your side. Tyre compression and inertia also provide you with a transient grip. As your shoulders move beyond the handlebars, start to push up on your arms and legs to move your centre of gravity up.

Like in a static hop, use this push-up to thrust your shoulders over the obstacle, use your forward momentum to lean your torso further over the obstacle.
As the rear tyre bounces back, unlock the front wheel and stretch your arms again to roll the front wheel forward, levelling the bike up.

For a nice finish on the rear wheel (fully stretched), you can perform a wheel-swap, pulling up the bike further in front of you while tucking your knees.

Click on any photo and use the scroll-wheel to animate the move.

The front wheel hook

1° Launch a fast bunny hop or a pedal up to build momentum, aiming the front wheel just above the upper edge of the obstacle.

2° Land with both brakes locked and stay supple to avoid a full rigid stop when you slam your tyres on the obstacle.

If you practice on something that is not too high, the first part of the move is quite easy, you could look at it like a lazy bunny hop that does not
even bring your crank up to the upper edge of the obstacle.

But then the second part is truly spectacular. You must carry-on with your initial momentum to bring your shoulders over the top of the obstacle
while moving your centre of gravity over the front wheel.

Although the rear tyre has limited grip, especially on vertical surfaces, the front wheel is hooked and offers enough support to pull yourself up
on the handlebars before the final push up.

Try to hit the obstacle with both wheels precisely at the same time, this will give you more punch in the rebound phase to tilt the bike over. Landing back wheel first would litterally kill your momentum.

It is important to go fast enough and build the momentum you'll need for the second phase of the move.
This is what will allow you to keep your shoulders moving forward over the obstacle.

Before you tilt the bike over its front wheel, let the rear wheel bounce up, then follow up in some sort of wheel-swap.
The push-up phase helps you thrust your whole body up again, a bit like in a static hop but assisted by your initial speed and the rear tyre bouncing off the sidewall.

Alternatively, if you can go fast enough (more likely on a street bike) and if you reach the obstacle with proper upward momentum,
you'll be able to keep your shoulders flowing over the obstacle as you land and push your way through to roll the rear wheel up without locking your brakes.

This will be much smoother than "stopping and hopping" over.
The trick is to avoid a full rigid stop when slamming the wall and instead, surge your shoulders over the bars without pushing back on the obstacle (that would kill your momentum).

At the beginning, it's quite common to fall back, often because you end up leaning back too much and your shoulders can't flow over.
Try this out on sloping obstacles first, they are less scary and make it easier to understand this two-fold technique.
The slope will help you secure more grip and rebound from the rear tyre.
Focus on leaning forward as you take off, this will definitely ease your flow.

Experienced riders will hook their front wheel onto just anything.
The strain in the handlebars is really high when you hang by the front wheel, and if the front tyre is not well positioned,
it will tend to slip off the obstacle or the front wheel may turn on its side.

On slanted obstacles, you may be able to maintain the hooked position and then perform a hooked static hop.