Getting on the front wheel (endo)
1° Moving at a slow pace, just apply full brakes on the front wheel, don't lock your arms.
2° Carry on moving your body forward until your weight is above the stem.
3° Pushing on the handlebars while tucking the knees will lift the back wheel.
Once you master the endo, you don't need to be rolling to launch one. You can just shift your weight forward while braking,
to end up on the front wheel. Then if you are in a slope, just release the brakes to roll on.
See this move in a video or the full move until return to
What is it good for?
It is really useful in real trials, either to reposition the rear wheel from one spot to another, turning on the front wheel, or to clear the rear wheel away from a gnarly section, by smoothly rolling on the front wheel until the rear tyre gets some grip on a safer section. Or any combinations of both. This helps for turning around, either going down or in straight horizontal moves, or even climbing in support on the front wheel.
How to do it
At the beginning, don't go too fast or you'll go over the bars (remember, it's about balance, not about crash speed). If things go really wrong, do not release the front brake (too unpredictable) or you'll eat (hit) the ground. Instead, jump off the bike while holding the handlebars. If you are in a slope, release the front brake slightly to ride down on the front wheel, in full balance above the stem.