The Kilowatt is a power unit, equivalent to 1000 watts. If we express watt in units used in electricity, we can say that a watt is the electric energy produced by a potential difference of 1 volt and an electric current of 1 amp. This may seem too technical, but it is especially important not to confuse kilowatt (kW) with kilowatt-hour (kWh). This is because, the first is a unit of power, while the second is a unit of energy measurement. Power is usually a constant value within a given circuit. For example, the power of an air conditioner could be 1200 watts, or 1.2 kilowatts. As for consumption, this same air conditioner, if it was on for 10 hours would consume a total of 12 kWh. To know the value of this, just look at your electricity bill, to see how much your energy provider charges you for kWh.
The Horsepower came about when, for the first time in history, people had something like power to use other than animal traction. This "something" was a steam engine and James Watt pioneered the construction of these steam engines. His target audience was precisely the people who used horses to do the heavy work, which would then be done by machines. Sales did not go well at first, so to help sell the machine it was necessary to equate the work developed by the machine with the work done by a horse. That is why the horsepower measurement unit was created. To be more precise in assessing this unit of measure, James Watt has carried out various experiments in order to measure the work performed by a horse for a certain period of time. From there he just needed to see how long it took his steam engine to do the same job.