These terms can be a bit confusing.
As mentioned above, Torque is a twisting force. Torque can be applied with zero work being accomplished. Think about what happens when you torque the headbolts on your Shovelhead. When you are turning the bolt, work is being accompsished (tightening the bolt). As you get up to torque and hold it there without moving, there is no work actually being done (the bolt is stationary) even though torque is being applied, but you will get mighty tired holding it.
Some steam engines and certain electric motors are capable of applying torque at zero rpm; therefore no work is being done and no horsepower is being developed.
Horsepower is a measure of work done in a given amount of time. In order for horsepower to be developed, something must be moved; also the amount of time must be measured. James Watt defined the Horsepower as 550 lbs/feet of work per second, or 33,000 lbs/feet per minute. He conducted experiments and detirmined that an average work horse could produce this amount of work for relatively long periods of time.
Horsepower does not need to be rotary motion. A hydraulic cylinder can develop measureable horsepower in linear motion without applying any torque at all! A rifle develops horsepower when firing a bullet, although it is not customarily described as such. Still, work is being done in a measureable time frame, so the definition of horsepower still fits.
So we see that torque does not necessarily generate horsepower, and horsepower can also be exclusive of torque.
A typical car engine does require rotary motion to generate both torque and horsepower. This is where the confusion starts.
Torque will be maximum whenever there is the most "push" on the piston. This is going to take place pretty close to the time when the most air/fuel mixture is drawn into the cylinder which is also known as maximum volumetric efficiency. When we rev our low speed 300's too fast, this volumetric efficiency drops off because the cams, etc. aren't right for high speed useage. Less air/fuel enters the cylinder and torque also decreases, even though the engine spinning very fast.
I like to think of torque as the "push", and horsepower is how many "pushes" per minute. More "pushes" equals more horsepower. Stronger "pushes" equals more torque.
Clear as mud, eh?
Joe