A horsepower is about 745 watts. James Watt, trying to market his steam engines, needed a way to explain to potential buyers how much work his engines could do. He measured the work a horse could do in a given length of time, and then did the calculations so he could explain his machines in terms of how many horses one could replace. In 1993 RD Stevenson of the University of Masschusetts published a Letter in Nature (364, 195, 17 July 1993) in which he reported that under modern testing conditions, Watt's calculation was about right when compared to a horse's sustained output.
If you wish to calculate the horsepower involved in a specific motion, there are a number of factors that must be measured, which vary depending on the situation - whether the motion straight line or rotational is a big factor. For most cars, the horsepower is not actually measured, it is calculated, either through measuring engine displacement (how much volume the pistons move through), or indirectly by putting the car on a dynamometer, a device that measure torque output at the tires.
Horsepower - noun ( pl. same) a unit of power equal to 550 foot-pounds per second (745.7 watts).
Horsepower was originally defined to compare the output of steam engines with the power of draft horses. The unit was widely adopted to measure the output of piston engines, turbines, electric motors, and other machinery.