So here's a couple of things that a workout can consist of:

* Warm-up cardio
* Cooling-down cardio
* Mobility drills
* Dynamic stretching
* Static stretching
* Fat-burning/endurance training cardio
* Warm-up sets
* Weightlifting
* Did I forget anything?

So what is the correct order to do these things in?

Some stuff I already know:

* If doing cardio, do it after lifting. This is because cardio will use stored energy in your muscles that you need for doing strength training.
* Warm up muscles that are going to be used before heavy lifting (but at what point before? See questions below). One reason for this is so you can feel this muscle better, so you can have a better mind-muscle connection.
* Divide the lifts from heavy compound exercises to isolation exercises, because you'll need multiple muscles working together in the compound movement, and if one of those muscles is already tired out, they can't do this as well.
* If doing core work, do it after other lifts. If your core is already tired, your body has more difficulty keeping good form and exerting power.

Some specific questions I have:

* Stretching in between sets? Or after a couple of exercises? Or after all your lifting?
* Warm-up sets of everything before you start any lifting, or just a warm-up set before every exercise? Or both?
* When to do dynamic and when to do static stretching?