The answer to this question depends on what your main goals are. Do whatever you want to be better at first.
When you first start exercising, your muscles and liver are loaded with glycogen, a form of sugar that is stored in those places for quick retrieval when energy is needed. As you lift weights or do cardio, the glycogen levels go down and causes your body to look for energy in other places.
These other places can be stored fats or proteins. Think of glycogen as a high octane fuel. Your car runs really well on it but it can also use other fuels. Fats and protein are those other fuels and while your body can use them, using them during exercise can decrease your performance.
If you are interested in increasing your aerobic capacity, (running, biking swimming) then do cardio first. If you want to build muscle, lift weights first.