If you are making your slipcovers from scratch, choose natural, pre-shrunken fabrics like cotton or linen. Not only will the natural fibers be more comfortable to have against your skin, but because it is pre-shrunk, it will fit better on the furniture without stretching or shrinking. These fabrics also hold up well through many washings.
If you are prefer a fabric other than pre-shrunk cotton or linen, you can choose a fabric or slipcover that has either polypropylene backing or other non-slip coating like Super Grip, a spray-on fabric coating, to decrease the chance of slipping.
Regardless of the fabric type, you can use batting or non-slip rug liners between the furniture and the slipcover to stop slipping. Batting can also come in handy to pad wooden arm rests and the non-slip rug liners are helpful when you are trying to cover a leather or vinyl piece.
Once you have your slipcover in place and tucked in to your satisfaction, use a PVC pipe or wooden dowel cut to the length of the back of the sofa or chair and tuck it down between the back of the chair and the cushion; the farther down and to the back of the chair or sofa, the better. An alternative to the pipe or dowel that uses the same anchoring principle is rolled up newspaper or magazine secured with rubber bands. If you are using a light-colored fabric, avoid newspaper as the print may transfer. Twist pins, which you can find at most craft or fabric stores, can also help keep slipcovers in place. Tacked in to corners or other pleated areas, these pins can be very discreet while keeping the cover firmly in its place. If you have to place the pins in visible areas, look for an option with a decorative finish.