A warm-up can range from walking to a light jog on the treadmill for 10 minutes, riding a stationary bike; it can even mimic your resistance training regimen just with lighter loads (weights). There are really no limitations on what it could consist of other than that you don’t tax or tire yourself out before your main workout; you can perspire a little bit, but you shouldn't be gasping for air or fatiguing yourself, again it’s called a warm-up for a reason.
Think of it as starting up a car in freezing conditions, you’re supposed to drive the car nimbly for the first 10 minutes or so, so that it can properly warm up and perform at optimal levels; otherwise your engine, brakes, tires, and other components of the car could take some damage and not perform at 100% over time. Starting a workout cold (not warmed up) could cause an injury, especially if you’re a serious athlete or weightlifter; you’re at more risk to pull a muscle, sprain/strain ligaments and tendons, and you may not be able to lift as much weight during a session, and or become fatigued sooner.
In my opinion the best thing to do before a workout is what’s called a “Dynamic Warm-up”, and it’s basically a method in warming up that uses different exercises and techniques to hit all parts of the body, and utilize all planes of motion rather than just walking/jogging on a treadmill. It gets your rate going, your blood flowing, and loosens up any tight muscles you may have; as well they’re fun, they have variety, and you can adjust them to be a little more specific to your workout. Dynamic Warm Ups can range from complex to pretty simple, but either way they get the job done. Here’s a great example of a Dynamic Warm Up routine by Nick Tumminello, a top expert and trainer on all things strength, conditioning, fitness, power, and so on; he’s also the creator and founder of Performance University, check him out!
So now you have sort of an idea of what Dynamic Warm Up is and you can create your own, change it up whenever you want and so on, the important thing is that you’re properly warming up. If you’re just starting out with exercise and perhaps all you want to do for starters in jogging on the treadmill just be sure to do a brisk walk for about ten minutes first to get your legs loosened up and warm. You’ll be a lot better in the long run for it, and you’re less likely to develop any muscle imbalances which could lead to injuries down the road. Stay tuned for what to do after a workout, the cool down!