Piping with a filled pastry bag (or piping bag) has to do with angle of the bag to the work surface, and the direction in which the back of the bag is pointed.

Before you start, twist the bag closed until all of the air is purged from the bag and the filling is forced into the tip.
SARAH SAYS: To get the feel of the piping bag and how hard to squeeze, practice piping on a sheet of waxed paper or on the back of a baking sheet. Use our Practice Buttercream Recipe so you do not waste a lot of expensive ingredients.

How to Pipe with a Pastry Bag using Two Hands:
1. To pipe, position your nondominant fingertips (not your hand) in the middle of the bag or near the tip (the hand facing you to the right in the photo) and use it to guide the tip as you squeeze the filling out with pressure at the top of the bag from the palm of your dominant hand (the hand facing you to the left in the photo).
SARAH SAYS: Do not squeeze the bag with the fingertips of your dominant hand (the hand facing you to the left in the photo) because you will exert uneven pressure on the bag; you want to use your palm so the pressure is even and steady.
Never hold the pastry bag with your entire nondominant hand (the hand facing you to the right in the photo), rather use your fingertips. The heat from your entire hand will quickly warm the contents in the pastry bag, whereas your fingertips are cooler. 

Famed cake designer Toba Garrett showing How to Ice a Cake Using a Pastry or Piping Bag. Photo by Sarah Phillips, 2007
Try Toba's Decorator's Buttercream Icing Recipe, used in the photo.

2. As you pipe, frequently twist the top of the bag to keep it tight around the filling. As the contents of the bag get used, the pastry bag will get smaller in your hand. But, continue to place your fingertips (not hands) near the pastry tip. We use the baking technique with our French Macarons Recipe Tutorial.

How to Pipe with a Pastry Bag using One Hand:
VIDEO
Hold the baked good in one hand (the hand facing you to the right in the photo), such as our Brownie Bite; Hold the pastry bag, at the end, with your dominant hand (the hand facing you to the left in the photo), and squeeze the batter through the pastry tip. (Make sure you do not fill the pastry bag so it is unwieldily).
SARAH SAYS: To get the little swirl, start near the edge and go all the way around, then, continue the spiral on top of the first layer and continue around, ending at the center top of your brownie bite.