When both the shooter and Blaine signal that they are ready, the shooter presses the trigger. We hear a loud noise and the bullet lands traight into the cup in David's mouth. We can then see the whole thing in slow motion.
See this amazing performance here:
You are probably wondering: did he really do that, or was it some sort of a trick? Is it really possible to catch a bullet using a simple mouthpiece? After all, the slow motion videos look really convincing.
So, if it was just a trick, how was it done? It has less to do with physical skill and accuracy and more with clever gimmicks and some video editing. When you see Blaine catching the bullet in real time, there is actually no bullet being shot. The sound of shooting is artificially created. The cup in David's mouth is actually a gimmick which, when triggered (probably by remote control), vibrates a little bit and then lets out some smoke to create the illusion of a bullet hitting the cup. Trust me, that is no ordinary cup.
But what about the slow motion videos?
The slow motion videos are filmed separately. This time, they actually shoot something into David's mouth, but rest assured it's not a .22 caliber bullet. Also, they shoot it from a much smaller distance. They give it just enough speed and force to create the effect we see on the video, but not enough for it to be really dangerous.
The rest is clever video editing.