A physical system that can do work on other physical systems has an amount of energy that is equal to the work that can be done. For example, a compressed spring can do work on another body when it expands. The amount of work that can be done is the energy stored in the spring. As work is the product of force and displacement in the same direction, work is expressed in terms of Newton*meter or Joule; energy also is expressed in Joules.
The rate at which a physical system does work on another physical system is referred to as power. Power is the energy expended per unit time. It is expressed in terms of Joules/second or Watts.
Enery is related to energy because without power you wouldn't have any energy, and without the time you wouldn't have energy either. As you can see that the equation for energy is: ENERGY= POWER x TIME, so if you take out power u wouldn't have enegy, and if you take out time you wouldn't have energy either.
simply , Power=work/time