Height differential is always a key in dunking. Being tall allows you to have a lower vertical jump than some one shorter would need to be able to dunk.
First step is to lace up your basketball shoes, or tennis shoes.
Secondly, stretch out your legs and arms before doing any work outs or dunking. This is important so you don't pull any muscles or get other injures.
Third, jump rope. Alternate between jumping on either leg. Do short hops and high hops when jumping to work different muscles in your legs at different paces. This will help increase you're vertical.
Another work out after you jump rope, and to help strengthen leg muscles are calf raises. You can do this with or without weights. With them will work your legs harder, and work your legs more.
One last thing to loosen up before dunking is doing a few short sprints or a light jog.
Then you'll need to find a basketball. Trying with smaller balls will help you get the feeling of how to put the ball down inside the rim.
Lastly, before you attempt to dunk is to find a basketball hoop.
Confidence plays it's own role in dunking. If you miss get back out there and try it again! Learn from your mistakes, as in what you did wrong and then do the opposite.
Practice pays off in the end, first time you dunk is always a huge sensation.
As you improve and work hard you will see your dunking abilities become easier.