Keep your thumb and middle finger pinched together. Then just rotate your wrist/arm real fast. Make sure your index finger is parallel with your middle finger and is real loose though 'cause that's what causes the "snap" sound.
We used to do this years ago in high school. I'm okay at it but I've got friends that can do it so loud, it sounds like a whip cracking. It'll take pratice, but you'll be doing it like Ali G in no time. Booyakasha!