I would define a warm-up simply as light exercise in preparation for more strenuous exercise. Warm-ups can and should vary a great deal, but you should always progress from general lighter exercise to more specific and strenuous exercise.
The goals for your warm-up include:
increasing your heart rate and blood flow throughout the body;
increasing body temperature;
increasing blood flow and temperature in the muscles you're about to use;
increasing elasticity of muscle you're about to use;
increasing mobility in joints you're about to use;
and finally practicing the motor patterns you'll need for the upcoming exercise.
If your warm-up accomplishes all of these things, then you'll be ready to perform at your very best and less likely to hurt yourself doing it.
What role does stretching play?
I believe stretching is an important part of any fitness plan and is vital to keeping the body balanced and building flexibility and mobility. Despite that, stretching alone is definitely not a warm-up. Warm-ups don't necessarily need to include stretching at all. In fact stretching can be detrimental to certain athletic activities.
Static stretching impairs muscle contraction speed and force for up to two hours. The reason being, static stretching reduces the elastic properties of your muscle. Muscles are like waist bands, if they are stretched out (elongated), then they will lose the elasticity. To increase the elasticity of a muscle you must warm it up, literally increasing the temperature. Think of a rubber band that's been in the freezer. If you stretch it out, it'll probably break.
If you are preparing for an explosive activity and you feel like you must stretch, then do dynamic stretching instead. Dynamic stretching doesn't seem to have the same detrimental effect that static stretching does.
If you're not worried about being powerful, and you don't feel loose after your warm-up, then by all means do some dynamic or static stretching to help increase your range of motion and loosen up particularly tight muscles.
Running a Race or a Fast Workout
Beginner: light jogging 3-5 minutes, a couple of short strides at race pace (go out at a reasonable pace in the race)
Advanced: easy running 10-20 minutes, optional dynamic stretching, light drills, change into racing shoes, 2-4 strides at race pace
Common Mistake: warming up to early and then standing around getting cold and stiff...ideally you want to be warm and sweaty with an elevated heart rate on the starting line (this doesn't mean tired)
full body calisthenics (I do this myself and with most clients) or a few minutes on the elliptical starting slow and building to a moderate or even vigorous pace (I use this for clients that don't do the calisthenic warm-up)
follow the general warm-up with a more specific warm-up, as in light warm-up sets for the first exercise and any other exercise that is using a different muscle group
If the exercise is truly light then you don't need a warm-up. Walking, light jogging, or very easy activity of any kind. If you would do it for a warm-up, then you don't need to warm-up for it.
Explosive or Maximal Strength Exercise
There are so many exercises that could fit in this category that I'll have to be very general in my description. Start with a general warm-up that could be jogging, running, calisthenics or any other means that increases blood flow and body temperature. Progress to more specific activities. If you're throwing then throw, jumping then jump, lifting, then lift. At this point you should still not be taxed. Now that you're starting to feel ready, ramp up the intensity bit by bit until you're fully simulating the activity. Here are a couple of examples.
Throws: light jogging, light drills, over-head throws, light standing throws and footwork, standing throws at 100%, full throws
Common Mistake: going straight to full throws or straight to standing throws at 100% effort
Common Mistake: taking too many throws or not enough throws in warm-ups...learn your body and don't let the pressure get to you in warm-ups
Maximal Lift: calisthenics, light set of 3-5 at about 50% 1RM, light set of 2-4 at about 70%, gradually add small amounts of weight completing 1-2 reps (definitely just one as you approach your max), it should take 6-8 sets total to reach your maximal weight, this allows you to activate the necessary musculature with out fatiguing it
Common mistake: too few warm-ups like the guy that does 135 3 times then tries to lift 250
Common mistake: too many warm-ups like the guy that does 135 10 times, then 185 10 times, then 225 5 times before trying to lift 250.