Power <-> torque relation
In general, the relation between power an torque is a simple formula:
Power[kW] = Torque[Nm] * RPM * π / 30,000
which means that you can always calculate the one curve from the other in torque/power diagrams (That's also what the dynamometer does)
So, why are always both curves plotted, if they are more or less the same?
This diagram shows a few curves of five theoretical motors:
Each motor has a torque of 350Nm at 8000RPM (and so the same peak power at that RPM), and each motor has a peak torque of 450Nm.
A normal driver uses the range up to 3000RPM on the street, so his best choice is motor #2 followed by #1. Those would give best acceleration at moderate RPM.
In a race where the motor runs at very high RPM, you'd better chose #5.
This evaluation can be done with both curves - power and torque, because they show more or less the same quantity. BUT the torque curves show the differences much clearer than the power curves!
However, the power curves (can) show some interesting details. The power of #4 decreases between 4000 and 5000RPM. Another point is that usually, max power is not at max RPM, and you want to know at what RPM it is, and how it behaves around that RPM.
Why does the power still increase though the torque already decreases with RPM at some point?
Imagine you have a 50kg weight which you lift by pulling a rope which runs over a pulley at the ceiling. The force you have to effort is just the gravitational force of the weight when you pull it with constant speed. Since 50kg is quite heavy, you'll lift it very slowly. If the weight is lighter, you need less force, and can lift it faster. Let's say you lift 25kg in 1/3 of the time. This means, in the same time you lift the heavy 50kg weight, you can also lift a total of 3x25kg=75kg.
Since power is work done per time and you can lift 75kg instead of 50kg in the same time, the power is 50% higher - though you put in only half the force.
It's about the same for a motor: At high RPM, it may have less torque (force) during a rev, but since it does more revs in the same time, it can deliver more power.
What happens in the gear box(es)?
As said, power is work done per time. Since power is conserved, the power at the motor shaft equals the power at the wheels. From the formula above one can calculate what happens when the ratio of motor an wheel ratio is different (neglecting any losses):
Wheel_torque = Motor_torque * Motor_RPM / Wheel_RPM
In my next diagram, I've plotted the wheel torque vs. motor RPM for the six gears of a BMW M3 (365Nm@4900RPM; 252Kw@7900RPM):
But it's also possible to draw power and torque vs. speed:
Yes, the 365Nm of the motor is transformed to almost 6000Nm (4400lb ft) in first gear. This shows the massive impact of gear ratios as well as wheel dimensions. On the other side, power is always the same at a given RPM.
Note that when you shift into second gear at or around 4900RPM (max torque), you reduce the wheel torque by about 50%. (And when you shift into 3rd later, you loose again about 50%).
This means, in a race you will shift as late as possible, even if also power already falls, because shifting means a heavy loss in power / torque. (The red area in my plot just marks the RPM range from 4900 to max in first gear to make this clear). However, in an acceleration contest where you start from zero, high torque at low RPM will help, because it's important to get to high speed as fast as possible, and it doesn't matter that much if you still accelerate a little on the last meters.
Of course, in reality there is drag and so which increases with speed, and the only way to overcome it is even more power. Thus, power of course defines top speed, but this example shows that power already plays a role in the range of 50km/h / 30mph, which is not really fast.
So compare different cars by power or torque?
You have seen the massive impact of RPM ratios due to the transmission, and wheel circumference also plays a role. So it's impossible to compare two cars by just looking at their motor torque curve. This only works for a car with several motor options, but same transmission. Power is a little (!) better. Note that the BMW M3 delivers more or less constant max power above 125km/h in 3rd gear, when you shift late.
Fuel economy
Torque is also a measure of the work the motor does during a single rev. More precisely:
Work_per_rev[J]= torque[Nm] * 2π
If we consider that the motor burns always the same amount of fuel per rev (not fully realistic, but OK), i.e. the same chemical energy (work) is released, the ratio of chemical / mechanical work is best when torque is at it's maximum. So, the machine runs most efficient when torque is high.
But keep in mind, best fuel efficiency is not equal to best mileage! In case of the BMW M3: Driving at 2000RPM instead of 4000RPM means reducing torque from 340Nm to 290Nm, which is a loss of only 15%, but fuel consumption is reduced by 50%.
This is why it is recommended to drive at very low RPM for best mileage, though fuel efficiency isn't the best there. However: High torque at lower RPM for sure means better mileage.
Conclusion
In general, power and torque are two measures of the same thing: The strength of the motor. If you have one curve, you can calculate the other.
Power determines the racing capability and max speed of the car, but also acceleration capability once the motor has reached a higher RPM
Torque shows much clearer what acceleration capability the motor has at low RPM, but the torque at the wheel depends on gear ratios and wheel dimension, so it's not that easy to compare. A normal driver would like to have high torque at low RPM.
And please note that I made several assumptions and simplifications here.
About my data
I got the motor curves from BMWs press site. And this (unfortunately German) site takes tire dimension, a set of RPM and a BMW model for gear ratios (or custom ratios), and calculates speed at the RPMs in the gears. In my case, the circumference of the wheel is ~2m and the speed is 7.5; 12.9; 19.3; 25.6; 30.1 and 35.1km/h in gears 1-6. This allows to calculate wheel RPM for given motor RPM in a given gear.