Have one of your audience members come and inspect the pencil, and your hands to make sure you are not concealing anything. This is an important step to making sure the trick looks believable.
Hold the pencil firmly in a fist with your right hand and stand sideways so that the front of your closed fist is facing the audience.
Grab your wrist from behind using the other hand. Tell your audience that you are holding the wrist to make sure the other hand isn't up to any tricks.
Extend the index finger of the left hand outwards to secretly hold the pencil against the palm of the other hand. This is the secret to the trick, so don't let the audience see this. Keep yourself turned to the side.
Slowly open the fist of the right hand, finger by finger. The pencil will appear to float in thin air against the back of your palm, when really you are holding it in place.