Continued from Weight Transfer.
As you enter a turn, you may transfer some weight to the inside peg, to help push the bike into the turn.
Then, while cornering, you weigh the outside peg, for stability and control.
Weight transfer side-to-side is more critical for Wheel Placement++. The physics behind it is that while you cannot alter the trajectory of the combined bike+rider ceter of mass that easily, by moving your body to the right, you can then push the bike to the left - just enough to miss that huge rock you didn't notice before!
The classic cornering in motocross is while sitting down on the seat, with the inside leg up and out, near the front wheel. You are sitting down as far forward as possible (on the tank).
The idea behind that position is to move as much weight as possible (even the few kilos of boot+foot) to the front, to aid in cornering a little faster while either maintaining speed or accelerating at the exit. The weight of the body being that far forward helps get traction on the front wheel.
Also, if we're talking about transfer, you will be instructed, at the entrance into the corner, to smoothly transition from standing in the rear (because you were braking really hard) to sitting on the tank at the same time as you're leaning/steering into the turn - that weight transfer helps you engage the front wheel easier into the turn.
While you're in the air over a jump, you can't accelerate, brake or steer - that much is obvious. The same thing happens when going over a crest - you don't have to be in the air, but the suspension is unloaded and there's no weight on the tires. Use either brakes and you'll lock the wheels pronto!
This is more important for tarmac racers - dirt riders are probably compressing the forks and looking forward to a jump :)
The opposite however is important for both: at the bottom or at landing, the traction is maxx, so give her!