James Prescott Joule was the first scientist to discover that heat is a type of energy. While studying the relationship between heat, work, and temperature, he was experimenting with fluids like water. He found that when he agitated the fluid, its temperature increased. Joule performed mechanical work on the fluid and in doing so, converted that mechanical energy to thermal energy, a term he coined.
Joule has since become one of the most famous scientists in history. For his work, he earned an essential unit of measurement for a namesake. A joule is the amount of work done by 1 newton moving an object through a distance of 1 meter. It gets rather scientific, but for a little perspective, know that there are 1,000 joules in 1 British thermal unit (Btu), a much more common unit of measurement for thermal energy systems.