To understand the question you asked requires some math and an explanation of some basic concepts.
WORK - Work is a measurement of a force acting through a distance: Example ft/lb "foot pounds" (pounds=force, foot=distance).
POWER - Power is the measurement of the rate at which work is performed and therefore how much energy is consumed during a process. The units are therefore force through a distance per unit of time. power measures how much work is being done over a given time interval: Example ft lb/sec (foot=distance, lb=force, sec=time).
HORSEPOWER - Horsepower is simply a unit of power. It is defined under the assumption that a horse can move 33,000 pounds 1 foot per minute (1 HP=33,000 ft/lb per minute). Since there are 60 seconds in a minute, horsepower can be reduced to 550
ft lb/second. Horsepower was originally defined by James Watt (inventor of the steam engine) to compare the power of his steam engines to the power of a horse which everyone understood at the time.
TORQUE - Torque is the measure of an objects tendency to rotate about a point. It is a measure of work, and in terms of an engines output can be simply described as the net twisting force. Torque, which is measured about a fixed axis, is not a time dependent variable.
Horsepower and torque are closely related concepts. An advantageous method to understand the relationship between horsepower and torque is to look at the formulas for computing HP & TQ.
Torque=(horsepower x 5,252) divided by rpm
Horsepower=(torque x rpm) divided by 5252
A dynamometer actually measures torque and calculates horsepower using the formula above. Don't get confused by the 5,252, it is a mathematical constant derived from the fact that a one foot circle has a circumference of 6.2832 feet. Dividing 33,000 by 6.2832 gives you 5,252.
I want to note that the units used here are imperial units. Metric units for HP & TQ are the units most commonly used by engineers and the science community. If you look at a dyno chart that uses metric units the HP & TQ cross at a different RPM than 5252. If you look at the link to dyno charts from Classic bike Raisch they are shown in metric units and the HP & TQ charts are on separate dyno graphs. If they had shown both on the same graph the lines would have crossed at around 9,200 RPM if memory serves me correctly.
Hopes this helps. I simplified the derivation of the 5252 constant and can give a longer complete math explination if necessary.
John