If you want to know the horsepower of an engine, you hook the engine up to a dynamometer. A dynamometer places a load on the engine and measures the amount of power that the engine can produce against the load.
Similarly, if you attach a shaft to an engine, the engine can apply torque to the shaft. A dynamometer measures this torque. You can easily convert torque to horsepower by multiplying torque by rpm/5,252.
You can get an idea of how a dynamometer works in the following way: Imagine that you turn on a car engine, put it in neutral and floor it. The engine would run so fast it would explode. That's no good, so on a dynamometer you apply a load to the floored engine and measure the load the engine can handle at different engine speeds. You might hook an engine to a dynamometer, floor it and use the dynamometer to apply enough of a load to the engine to keep it at, say, 7,000 rpm. You record how much load the engine can handle. Then you apply additional load to knock the engine speed down to 6,500 rpm and record the load there. Then you apply additional load to get it down to 6,000 rpm, and so on. You can do the same thing starting down at 500 or 1,000 rpm and working your way up. What dynamometers actually measure is torque (in pound-feet), and to convert torque to horsepower you simply multiply torque by rpm/5,252.
If you plot the horsepower versus the rpm values for the engine, what you end up with is a horsepower curve for the engine. A typical horsepower curve for a high-performance engine might look like this (this happens to be the curve for the 300-horsepower engine in the Mitsubishi 3000 twin-turbo):
What a graph like this points out is that any engine has a peak horsepower -- an rpm value at which the power available from the engine is at its maximum. An engine also has a peak torque at a specific rpm. You will often see this expressed in a brochure or a review in a magazine as "320 HP @ 6500 rpm, 290 lb-ft torque @ 5000 rpm" (the figures for the 1999 Shelby Series 1). When people say an engine has "lots of low-end torque," what they mean is that the peak torque occurs at a fairly low rpm value, like 2,000 or 3,000 rpm.
Another thing you can see from a car's horsepower curve is the place where the engine has maximum power. When you are trying to accelerate quickly, you want to try to keep the engine close to its maximum horsepower point on the curve. That is why you often downshift to accelerate -- by downshifting, you increase engine rpm, which typically moves you closer to the peak horsepower point on the curve. If you want to "launch" your car from a traffic light, you would typically rev the engine to get the engine right at its peak horsepower rpm and then release the clutch to dump maximum power to the tires.
One of the areas where people talk most about horsepower is in the area of high-performance cars. In the next section, we'll talk about the connection there.