When a magician waves his hands over a hat and pulls out a rabbit, he is performing an act of legerdemain or trickery.
Legerdemain can be used literally to describe a magic trick, or figuratively to describe some other kind of trickery or deceit. If you and some friends cook up a scheme that involves telling complicated lies so that you can stay out all night, you are guilty of legerdemain. The word comes from the French léger de main which means dexterous, or light of hand.