A Butterfly Jar is an item that can be used to contain live butterflies for display.
In order to catch a butterfly, the player needs to right-click on the butterfly with jar in hand. Once caught, right-clicking again somewhere in the air with the jar in hand will release the butterfly. Be careful, not to place the jar accidently on the ground when chasing the beast.
When you catch a butterfly in a jar for the first time you earn the achievement "Fluttering By".
The jar can be placed on a solid block for decoration. Once placed you will see the butterfly flapping it's wings inside the jar, it always faces the player. The special butterflies of Mirkwood et cetera, will not keep their particle effects once they are caught in the jar. But the Lothlorien butterfly will give off some light when caught. Breaking the jar will cause it to drop itself with the butterfly still inside. It can be placed again or the butterfly can be released. :)
In order to make a butterfly jar, simply take a glass block and put on a wooden lid of any kind.