First law of thermodynamics: Explanation, Solved examples and Applications