Approaching the Rim
When attempting a windmill dunk, you want to be sure to approach the rim with a strong dribble. Only the elite jumpers of the world can execute the windmill dunk from a flat stance. Get a running start.
As you approach the basket, you will need to time your jump so that you begin your leap in the paint just past the free throw line. This will give you the room to execute the windmill portion of the dunk.
As you approach the rim, you will also need to time it so that you will not take to many steps and be called for the travel. This takes practice and repetition. Many people like to jump off one foot, but it is easier to execute the windmill dunk off of two feet with a running start.
Mentally you want to visualize the dunk as you approach the basket. If you picture yourself completing the dunk, your success rate will go up dramatically.
Approaching the basket, take notice of any obstacles in the paint or approaching from the wings. You may need to adjust on the fly if you have a defender in good position to block the attempt.
Completing the Windmill Dunk
As you reach your jumping point, you will want to take the ball with both hands and get a firm grip. Some people like to "cup" the ball to execute the move, but you risk losing your handle on the ball by not using two hands. "Cupping" the ball is a good alternative if you have small hands, and can not get enough air to complete it with two hands.
As you leave the floor, take the ball and go up with it. This is the time to adjust to your defender. It is at this point that you want to execute the "windmill" portion of the dunk. After bringing the ball up, you will take the ball quickly back down to your waist and back around in a swooping motion towards the rim.
You should be at the highest point of your jump at this point, and can slam the ball through the rim. Do not hang on the rim as you can hurt yourself.
When done correctly, the windmill dunk is one of the most exciting moves in sports. Make sure to celebrate accordingly as you go back to the other end of the floor.