Stretching is done in 3 ways, depending on intent:
Light: gentle stretch of a given muscle group, held for about 5-10sec. Think gently untangle the muscle before excercise
Warm-down: 10 secs or so. Squeeze the tissue fluid out of the muscle, removing by-products of metabolism.
Flexibility (do not do this before training, it temporarily weakens the muscle): hold for minimum 30 sec to deactivate and reset stretch reflex. Can also be done actively, where you find the stretch, and pull against it for 10 secs, which deactivates the stretch reflex.