A good warm up should consist of three parts. The first is a pulse-raiser, something that raises the core temperature of your body and gets a light sweat going. I always start with five minutes of low intensity cardio, usually either on the treadmill, bike or rowing machine.
The second part should be some dynamic stretching, to use your joints through their full range of motion and get them nicely lubricated with synovial fluid. Dynamic stretches keep the joints moving, either in a back and forth or circular fashion, as opposed to holding a stretch statically. A good example of a dynamic stretch is swinging your leg back and forth.
The third part of the warm up is a specific rehearsal for the following workout. For example, if your starting with back squats, you should do at least three sets before starting your working sets. The first of these initial sets should be performed with no added weight or just the empty bar, added weight gradually each set until you are nearly using your working weight. The purpose of this is to prepare your body, prevent injury, and get your mind ready for what’s to come.
These three steps should take 10-15 minutes, and if done properly should prepare your body to have a great workout. Just remember, the purpose is to protect your body and allow it to perform at its best, not to prematurely fatigue it before the workout has begun!