Exoothermic:
N2 + 3H2 --> 2NH3
Energy is required to break the bonds between the N atoms in N2, and the H atoms in H2. Therefore, energy is absorbed. When the bonds in NH3 form, energy is released. For this reaction to be exothermic, heat has to be released overall. So, the amount of heat released when the bonds in NH3 form is greater than the amount of heat absorbed when the bonds in N2 and H2 are broken.
Endothermic:
The opposite is for endothermic reactions.
C + H2O --> CO + H2
Again, energy is required to break the bonds in H2O, and energy is released when the bonds in CO and H2 form. For this reaction to be endothermic, energy has to be absorbed overall. So, the amount of energy absorbed when the bonds in H2O are broken is higher than the amount of energy released when the bonds in CO and H2 form.
Hope this helps, and correct me if I might've said anything incorrect