Stretching is not warming up! It is, however, a very important part of warming up. Warming up is quite literally the process of "warming up" (i.e., raising your core body temperature). A proper warm-up should raise your body temperature by one or two degrees Celsius (1.4 to 2.8 degrees Fahrenheit). It is very important that you perform the general warm-up before you stretch. It is not a good idea to attempt to stretch before your muscles are warm (something which the general warm-up accomplishes).
The general warm-up should begin with joint-rotations, starting either from your toes and working your way up, or from your fingers and working your way down. After you have performed joint rotations, you should engage in at least five minutes of aerobic activity such as jogging, jumping rope, or any other activity that will cause a similar increase in your cardiovascular output (i.e., get your blood pumping). The purpose of this is to raise your core body temperature and get your blood flowing. Increased blood flow in the muscles improves muscle performance and flexibility and reduces the likelihood of injury.