An exothermic reaction takes place between any two atoms if the resulting molecule has a lower enthalpy than the sum of the enthalpy of the two atoms.
The atom of sodium has one electron in its outermost shell. To achieve a stable electron configuration it has to lose this electron so that all the electron shells are complete. For this to happen the atom loses one electron and gains a positive charge. The sodium atom is changed to a positive ion Na+.
Sodium ions cannot be created on their own, for this to happen sodium has to react with another element the atoms of which are willing to take up the electron that is lost by sodium. The atom that takes up the electron acquires a negative charge and is converted to a negatively charged ion. The positive ion and negative ion are attracted to each other and form an ionic bond.
It should be noted that any reaction that sodium takes part in is exothermic. This shows that sodium ions are more stable than the sodium atom, else there would not be a release of heat during the reaction.