At the scale of a stint of several days of working out ....
A given exercise is normally not repeated for two days in a row (see later discussion for exceptions.) Since some exercises involve two muscle groups, you must plan carefully. For instance, don't do a chest press on one day and triceps the next day, because the chest press also used your triceps.
A good way to conceptualize the organization of your routines over several days is like this: Divide your body into two sets of muscles, using one or the other of these two schemes, or some combination thereof:
Scheme A, Push-Pull
Push muscles are your pectorals and triceps, shoulder (deltoids) quads and gluteals, and calves. Pull muscles are your lats, biceps, hamstrings. You push forward with your chest and triceps, you pull something towards you with your lats and biceps. Learn these associations (bicep/lat, tricep/pect or deltoid, etc) and organize your routines this way.
For the upper body, a stint of pull exercises is more exhausting than push, for the lower body, a stint of push exercises is more exhausting than pull. A full lower body routine is harder than a full upper body routine, if done properly. So, if you do all push one day, you will be more tired out than if you do all pull one day, so adjust your other exercise accordingly.
Scheme B, Upper-Lower
Upper muscles are, obviously, the ones attached mainly to your arms, and lower are the ones attached mainly to your legs. Lower is harder and takes longer than upper. You might do a day of upper body along with more than average aerobic exercise (which you should do every day but about which I have little helpful to say). Then, the next day you do lower body and less aerobic work (because the lower body work is more exhausting).
Hybrid Scheme: Upper/Push-Upper/Pull-Lower/Push-Lower/Pull
Here, you've divided the exercises into four categories, to do over four days. This gives you the opportunity to work one of the subgroups very very hard on a given day and then give that group lots of rest between efforts. If you get to the gym two or three times a week, don't do this, it's not enough. If you are managing to get to the gym every day for a period of time, this is a good way to work out.
But what do I do TODAY at the Gym?
Work hard. To be more specific, follow the large-to-small rule.
The next level of when to do what to which body part has to do with what you do in a given session at the gym. Here, the rule of thumb is to go from large to small. A 'bench press' uses the pects (large muscles, push, upper) and the triceps. A 'military press' uses the shoulder and the triceps. Then, there are a bunch of triceps exercises you can do. So do it in that order: Bench press, military press, then hit your now somewhat exhausted triceps with a couple of exercises.
In doing this your goal with the smaller muscles is to strengthen them beyond the point that they are needed to support your larger muscles. You are aiming for more than needed because there may be times when you need that extra support. Ideally, when you are done with your pects or lats, you should not feel as though your triceps or biceps are tired out, though they will normally feel as though they've done some work. If you find yourself limited by these smaller muscles, then give yourself a week, or a few days, in which you work only those smaller muscles.