Your overall goal is to attain good range of motion, while gradually extending that range to a degree appropriate to your fitness level and body type. There are several different ways to accomplish that goal, and you should use at least a few of them before every workout.
Warm-ups are fundamental. Cold muscles are much more likely to tear and lead to stretched or torn cartilage and other harmful results. Warm-ups and stretches help produce the fluid that lubricates the joints, and it helps the muscles become more elastic. Those both lead to safer, higher performance workouts.
Ten to fifteen minutes is the minimum for most people. This can be done by low-impact jogging in place, simple stretches and other techniques.
Static stretching, for example, is the old-fashioned stretch and hold for 30 seconds. This should be done with the arms, trunk, legs and neck. Dynamic stretching and ballistic stretching involve more active, bouncing-style or weight-assisted stretching, sometimes with extra force applied. Both types are helpful.
Some dynamic stretches involve holding the arms out to the side, then swinging them back and forth across front of the body, repeating for 30 seconds. Another technique involves using a short bar across the neck, lying on the shoulders. Place your hands on the bar, then bend slowly left, then right, moving the head toward the outer edge of the foot.
Abdominal muscles can be prepared by lying backwards on a large rubber ball. Push back slowly and raise the arms above your head. Repeat 10 times. Loosen your hamstrings by lying on your back, and raising one outstretched leg using a large towel wrapped around the foot. Grab the ends and pull up slowly. Switch legs, then repeat for 10 reps.
A full back stretch is accomplished by lying on your back and bringing both knees to the chest, hands clasped behind the knees. Roll forward until your feet hit the floor, then roll back until the head touches. Do 10 rolls.
Groin stretches can be done safely by using a large rubber ball. Place one knee on the ball and slowly rotate the ball a few inches away from your body. Move the ball back toward your body, then switch legs. Do 10 movements.
Both the legs and back muscles can get a good warm-up stretch by doing toe taps. Stand up straight, feet apart about shoulder width. Lean forward, touching the big toe on one foot with the opposite hand - left hand to right foot, and vice-versa. Those with lower back problems should consult a trainer or physician before attempting these.
For maximum flexibility, stretching routines should be carried out at least a few times per week. This will help maximize the range of motion and decrease the potential for injury.