Make a mark where the center of the bend needs to be, then mark an extra six to eight inches on either side of this center mark. This will be your "heat zone," where you need to direct the heat.  Keep any planned bends at least three to five inches away from any joints. You may need to block the end of the pipe with tape to prevent the sand from falling out. The sand inside will make this take longer, but it also ensures that the pipe holds its form and doesn't cave or warp. Turn the pipe regularly, applying heat to the inner and outer bend throughout your entire marked heat zone. Keep the heat source at least two to three inches away from the pipe to prevent burning the PVC. Keep applying heat and bending until you get your desired shape. If you want a perfect bend, use a metal can or object to provide a "mold" for you bend. Do not try and keep bending the pipe after the sand is removed. This can cause cracks and warping. You can save the sand to use again.
Fill the pipe with enough sand to cover two to three inches above the planned bend. Apply the heat evenly around your planned bend. Slowly bend the pipe, applying more heat as necessary. Remove the sand and let the pipe cool.