Know your songs and play them with comfort and confidence before trying any stage tricks. Guitar tosses, pick flips, barrel rolls, backflips and the like all can add to your stage presence, but not if they prevent you from performing your material. Allowing tricks to take away from your music does not add to the show; it makes it worse. Rehearse diligently before attempting to add flash. As you grow comfortable with the song, you'll be able to focus on performance rather than practice; your hand movements will become a matter of muscle memory, and this will free you to think of movements to make and moments in which to make them.
Know when to perform a trick. Tricks work best when they're appropriate to the moment and the music. The beat before an explosive chorus or the build-up to a guitar solo can be an appropriate place for a trick; the middle of a mellow verse generally is not. Tricks attract attention, so guitar tricks serve best when the audience's focus should be on the guitar player.
Equip your guitar to suit a lively and athletic stage presence. Guitar cables can tangle you up during tricks, and loose straps can send your guitar flying offstage or crashing to the ground. Wireless systems and strap locks are wise investments; wireless systems transmit your signal through a body pack or other apparatus to a receiver placed on your amplifier, and strap locks clip onto your guitar's strap buttons to ensure that they don't slip through the strap holes. You may also wish to have a "trick guitar," or an inexpensive instrument that you don't mind banging up a bit. Tricks are a matter of trial and error, and you don't want to make an error with a $5,000 vintage Gibson Les Paul.
Practice your tricks. Blowing a stage stunt is worse than never trying one at all. Perform only stunts you've practiced and can perform consistently, within the space you have (stages vary in size, and some are so small that guitar tosses and other tricks become impossible).
Watch vintage concert footage to get an idea of how guitar tricks started. Famous classic guitar tricks include The Who guitarist Pete Townshend's "windmill" pick attack, Chuck Berry's "duck walk" and AC/DC's Angus Young's permutation of it, Edward Van Halen's split-legged leaps and Jimi Hendrix's penchant for playing with his teeth.
Watch modern concert footage to see what players are doing today. Popular modern tricks include guitar tosses (see Resource 1), made popular by 1980s shred-metal players and adopted by contemporary emo and hardcore bands. Some players emulate a guitar toss by spinning along with their instrument (see Resource 2). Another version of the guitar toss is the guitar switch, a move embraced by punk bands (see Resource 3).