The concept of energy is quite common today but this was not the case before. As far as I know, even Newton, for example, didn't use this concept and Liebnitz just noticed that $mv^2$ was conserved without a deeper understanding of this.
The concept itself evolved with the years. At this moment my understanding is that: first there was an understanding of work which lead to an understanding of kinetic and potential energy and, hence, mechanical energy.
Then with thermodynamics this was better understood with the addition of heat as a way of transfering energy and, with relativity, also rest energy appeared.
Now, this is probably inaccurate and it's just the impression I got based on what I studied up to now. I would like to know with more details how the concept of energy evolved with time. Where was it born and how along the history of Physics did it become what we use today?
This question might seem "too broad", but just listing the main points in history that contributed to this evolution of the energy concept and some references to see the full history is already a good way to answer it.