Work: When a force causes a motion, work can be accomplished. Work is referred to as being completed, for instance, when someone climbs stairs in a building or office since they are defying gravity.
Basically, the amount of work a force does depends on two things:
The force's magnitude
The distance the body travels when moving in the direction of the force.
Therefore, the product of force and the displacement of the body along the direction of the force is used to calculate work. It is a scalar quantity with joule as its SI unit.
Energy: Energy is the ability of a body to perform work. The joule serves as the unit for energy, which is a scalar quantity with simply magnitude and no direction. 1-joule energy is the amount of energy needed to perform 1 joule of work.
James Prescott Joule, a British physicist, is the name of the unit joule.