Generally, you can do exercise throughout the day and don't have to do it all at once.
As for whether to do cardio or strength training first, think about which aspect is most important to your workout: aerobic activity or strength training. Is your primary focus to burn as many calories as possible (aerobic activity) or build muscle (strength training)? If aerobic activity is most important, do it first because the intensity and duration could be diminished otherwise. If strength training is most important, do it first because the amount you can lift and how many reps/sets you complete can be affected if you are more tired. This will ensure optimal performance on the most important activity. (For example, someone training for a race would probably do aerobic activity first.)
Another thing to think about is occasionally alternating the order of activity. When you do the same exercises in the same order over and over again, your muscles get smart. They become efficient and aren't challenged as much, leading to plateaus in strength gain and weight loss. Every once in a while, change it up for a week or so and you should continue to see results.