The butterfly knot is generally not one of the standard climbing knots beginners learn, but it’s well worth learning once you have mastered the basics. It’s useful for several things.
It’s the best tie in knot for the middle members on a rope team climb. While a figure eight on a bight is acceptable for this middle person tie in, it’s designed to be weighted in only one direction. The butterfly is designed for the rope to be weighted on either strand. As the middle person on a rope team, you don't know which strand will hold you in a crevasse fall.
The butterfly is generally easier to untie after it’s been weighted. Use it anytime you're significantly weighting a rope (like fixing ropes for a big wall, or tying off one end of rope for snow anchor testing or crevasse rescue practice.) Grab each of the "wings" of the knot and flex them back and forth to untie.
It can isolate a damaged part of the rope. Through stepping on the rope with a crampon, an ice tool puncture or maybe rock fall, a rope might get damaged so you are not comfortable using it anymore. Without knowing the butterfly, you’d have to cut off the damaged part and hope you have enough cord to continue the climb. With the butterfly, just isolate the damaged part of the rope inside a loop of the knot and you’re good to go, with a near full strength rope. (Now you need to figure out how to pass the knot while you are on rappel or belaying . . . but that’s a different topic!)
It can be tied between a two person rope team for glacier travel, to help minimize the length of a crevasse fall. Any kind of crevasse rescue situation is more difficult with just one person doing the pulling, but if you tie 6 knots in the rope between you and your partner, these can hopefully catch on the lip of a crevasse in the event of a fall, and minimize the length of the fall. Yes, they can complicate the rescue, but that is also another topic. Under the right conditions, this has been tested and proven effective. There is also another knot that has a slightly larger diameter called the brake knot, which may be preferable for two person crevasse travel, but the butterfly is acceptable.
And, because it's pretty much impossible to explain how to tie a knot in words, here is a short and sweet video from REI that does the job.
(It's not my preferred method, because this darn knot has probably more ways to tie it than just about any other, but it works OK. My advice: just learn one good way to tie this knot and don't confuse yourself with several.)