The purpose of a warm up is to prepare us for activity.
Since our bodies are complex machines there are multiple systems that we need to prepare. One such system is our cardiovascular system. When we engage in strenuous activity our demand for oxygen especially in our muscles increases. It can take several minutes for our bodies to make the necessary changes to meet the increased demand for oxygen including increased systolic blood pressure, increased heart rate and vasodilation in active muscles. All of these things can be achieved by moving, walking, jogging etc. some of them even occur just by thinking about exercise via the "anticipatory effect." That part is pretty straight forward, part of your warm up should include movement and or thinking about movement.
The next system that we should address is our neuromuscular system, ie the things that makes us move (our muscles) and the signals that control the movement (our brain). This area often leads to the most debate and I welcome your thoughts and opinions on the subject as well as reserve the right to change my recommendations in the future as research progresses, and as I continue to learn. With that said I recommend selecting specific movements that support and simulate the activity you are preparing to engage in. Push-ups may be a worth while warm up activity for an offensive lineman that will be doing a lot pushing during their sport, but does not make a lot of sense for a soccer player or distance runner who uses their arms comparatively little during activity. A shortstop will likely want to make sure they include lateral movements in their warm up, and a golfer will absolutely need to include some rotational movements but has little need for running liners or doing pull ups as part of their warm up. Warm up is also a great time to include any corrective exercise that you may be engaged in, such as heel walks to deal with Achilles tendonopathy, or prisoner lunges and front planks to combat anterior pelvic tilt. Spending time to reinforce proper movement techniques at a pace you can control is a good way to set your self up for success when things are moving at competition speed.
You may have noticed that I did not include stretching specifically in my warm-up recommendations. This was not by accident, while being flexible to a point may reduce your injury risk, stretching immediately before activity does very little to decrease your risk for injury. In fact there are some studies that suggest stretching immediately before activity can reduce your power output under certain circumstances, as well as the possibility that overstretching may negatively impact proprioception. So in review take some time to develop your warm up routine. A proper warm up should include movements that are specific to your activity, should be performed with attention payed to proper positioning and execution of the movements you are engaged in and should be performed long enough to allow your body to adapt to the increased physical demands that will be placed on it during activity.