Hello,
If your really curious, we can get into it...
We will need some basic information.
(I will be using information from an actual train, UP's ZLAG1. I'm too lazy to figure out the math on my own, and I had the paperwork readily available, floating around the trunk of my car.)
Anyway, we'll need (depending on the company) information that might be available either from a Timetable, or some sort of "Superintendent Bulletin" or "System Special Instructions".
Also, you will need to be either good at math, or have a calculator.
We will first look for our train tonnage. In this case its 6448 tons.
We will also need the
Tons per equivalent
Powered
Axle (TPA) limit for the territory to be traversed, here it's 172.
Now we take 6448 / 172 = 37.488 (Always round up) SO, final answer,
37.5 Is our
Equivalent
Powered
Axles or EPA.
To find EPA of a locomotive your going to have to scour the internet. I'm not sure where to find that information outside of a work environment... Sorry!

BUT! I can give you what I have on my paperwork:
(We have 4 locomotives, 2 on the headend and 2 DPU's) They are as follows:
UP 6446 a C44AC locomotive has an EPA of 12.1
NS 9739 a D9-44CW locomotive has an EPA of 11.5
-----DPU's-------
UP 6546 a C44AC locomotive has an EPA of 12.1
UP 4313 a SD70M locomotive has an EPA of 10.4
So now add those 4 numbers together:
12.1 + 11.5 + 12.1 + 10.4 =
46.1 So, to pull our train we require an EPA of 37.5 and we have 46.1 at our disposal.
If we had more engines then the 4 we do, we would either isolate them, but more then likely shut them down to save fuel.
There is actually much, MUCH more we would need to know in the REAL world, such as
Equivalent
Dynaminc
Brake
Axles (EDBA),
Tons
Per
Operative
Brake (TPOB), placement of the power within our train in regards to blocks of cars, types of cars, loads of cars, etc., etc., etc.
OH! I almost forgot!
If you want to verify your actual TPA verses the limit of 172 use this equation:
Train Tonnage / Total EPA = Actual TPA
So, our actual TPA is 139.869 (again, round up) TPA=
140 )So again, we are under the limit.)
I left out ALOT in an effort to keep it simple but that should get you started.
Good Luck!

P.S. If you mean't which kind of engines get used on certain kinds of trains then I can tell you that too. Most of the time, its first come first serve. But reliability, gearing, DPU capability, are they due for inspections, or type of locomotive can all be factors. As an example, UP often puts SD70M's as leaders on Z-trains (without DPU's) because they are reliable. Another example, some locals use 4-Axle engines because certain industry leads turn too tightly for 6-axle engines to navigate without derailing. Also of note, all UP trains that operate in my neck of the woods (ex. CNW territory) must have UP engines as a leader, because foreign power doesn't have the CNW's
Automatic
Train
Control (ATC) cab signal system; if you ever see a rerouted Amtrak train on ex. CNW tracks it will have a UP motor on the head.