If you must do it, put it into drive, foot hard on the brake, then lift the revs until the rears start spinning. As you lift off the brake, give it some more gas.
However, as said already, this isn't good for the 'box. If you do it too many times, you'll overheat the fluid. Even on the first attempt, it is actually possible to blow the torque converter.
Never, ever rev it in neutral and dump it into gear when the revs are already high. If you don't break the gearbox, you may break something else in the drivetrain.
Don't do any of this at all if you aren't willing to accept the cost of repairing what might break.