Horsepower is a direct function of torque - and torque is a function of nothing but the twisting force made by the engine acting on the rear wheels, like Motorhead said.

To define Horsepower more accurately, it is a unit of power, like watt (yes, on your lightbulb) Horsepower is a measure of doing a given amount of work in a certain time. One horsepower is 33,000 ft-lb/min. That is, 33,000 pound feet of torque delivered over the course of one minute.

The Horsepower output is determined by the following:

HP=RPMxTQ/5252

Horsepower equals Revolutions/minute multiplied by ft-lb divided by the constant (and hence no units) 5252. The resulting number gives you the units of horsepower, a ft-lb/min. If you look at any dyno readout, the HP and TQ lines will cross at 5252 - when, by definition, HP=TQ

So in a nutshell - there are only two things you can look at when dealing with power output in an engine - the torque produced, and the speed of the engine when that torque is produced. If you can create 450 ft-lbs or torque at 2000RPM, you have a certain torque acting 2000 times per minute and get a HP of 171. If you can maintain that ouptut of 450 ft-lbs from the engine, but can increase the RPM to 7000 (basically, keeping the same engine efficiency at 7000 that you had at 2000) you will have 600HP acting at the wheels.

So, horsepower is a measure of engine efficiency throughout the engine band - because efficiency of an engine varies with the speed it is turning, HP can give you an accurate measurement of the actual power that is being delivered to the wheels.

If you think about Torque mattering more off of the line than HP, here is why. If you are sitting still, the wheels are not turning at all - if your motor can generate an instantaneous torque of 600 lb-ft, but your car isn't moving, you get no HP. The force isn't acting through a distance. So, the torque that is applied to the wheels creates the initial acceleration.

Once the torque can act through the rotations of the wheels, the motor is effectively given a mechanical advantage, since it can spin faster and deliver the torque to the wheels at an increasing rate. This is the basis of HP.

And if that makes no sense, then I've begun rambling again.