If you want to get serious about decorating your cakes and cupcakes then you have to know how to ice them properly. The biggest mistake beginners make is that they hold the piping bag in the center and just squeeze the icing out. But this method lacks control and makes some extra icing ride up and out of the bag.
Check out this video to learn how to frost a cake properly by holding it between your palm and thumb.
Gabrielle Feuersinger, owner of San Francisco's Cake Coquette, demonstrates the proper way to use a piping bag (also known as a pastry bag) to frost a cake or cupcake. You shouldn't grab it from the middle, since that will just cause frosting to fall out of the back of the bag. Give the bag a twist for the most control.