Joules are the SI unit for energy. They were named after James Prescott Joule for his work on thermal energy and use the capital letter J. One joule represents one kg·m2/s2. The formulae for different types of energy include different variables, however, they can all result in energy being measured in joules (kg·m2/s2).
For example, the formula for potential energy is EP = m g h and this results in joules by the following logic:
Another example, the formula for kinetic energy is EK = 1/2 m v2 and this results in joules by the following logic: