Turn off the power to the outlets you are working on at the circuit breaker panel. Remove all of the outlet covers that you intend to work on as Great Stuff has one reliable usage per can (unless you use the pro kit with spray gun) - pausing in-between sprays will cause problems and create messes. Wear thin gloves and old clothing also carry a rag to catch any fly away insulating foam (I guarantee you will get it on your clothing). Get an extra can or two, as it is inexpensive and a big hassle if you don't have enough.
Shake the can of foam vigorously for 30-60 seconds with the nozzle off and cap on. Use an old blade screw driver and pry the sides of the electrical boxes(if they are not plastic then you will have to create an opening in the drywall small enough to thread the nozzle through) so that you can get the spray nozzle in-between the box edge and the drywall. Fill all around as best as possible. It is ok if there is excess, we will not waste the material (as shown later). Allow to dry for around 2-3 hours.
Tear off the excess foam with your fingers. Use the torn off excess pieces and jam them into the side of the outlet and the box. Never spray Great Stuff into the box as it is conductive when wet/gooey but once dry it poses no threat. You do not want to get the foam stuck to the electrical terminals on the outlet should you need to replace it in the future). Update 12-7-15: Please don't fill the electrical box with wet or dry foam. The airspace is need for heat dissipation. This can start a fire, especially if you put a heavy amp load on the outlets. Thanks to the readers for pointing this out in the comments. We were just so tired of the drafts and got a little carried away.
Now install the foam insulation gasket, screw on the cover plate, and top off with the childproof outlet covers, they keep the air from coming through the slots in the outlets. Acetone removes the foam from surfaces but it is best to just take your time and don't overfill.