Strong acids and bases like $\ce{HCl}$ and $\ce{NaOH}$ dissociate fully in water. Let us consider dissociation of $\ce{HCl}$. $\ce{HCl}$ in water dissociates as this.
$$\ce{HCl <=> H+ + Cl-}.$$
Now, initially, the $\ce{H}$ and $\ce{Cl}$ are covalently bonded to each other. If we want to break this bond, we have to separate the positive and negative charges and this needs energy. Water molecules are in constant motion. They have kinetic energy. When you add $\ce{HCl}$ to water, some of the water molecules collide with the $\ce{HCl}$ molecules and break them. Now, the potential energy of the $\ce{H+}$ and $\ce{Cl-}$ system increases(becomes less negative). Thus the $\ce{HCl}$ molecules absorb some of the kinetic energy from the water molecules and some of this energy is stored as potential energy.
But as $\ce{H2O}$ is a polar molecule, the water molecules get attracted to the $\ce{H+}$ and $\ce{Cl-}$ ions. The water molecules hydrate the ions and this decreases potential energy of the system(water molecules + ion). This decrease in potential energy is marked by an increase in kinetic energy of the hydrated ion and the surrounding water molecules.
So, as dissociation takes kinetic energy of the system and converts it into potential energy, this process should decrease the temperature of the system. Similarly, hydration should increase the temperature of the system. To decide which effect is more dominant, we have to take into consideration $\Delta H_\text{Lattice Energy}$ and $\Delta H_\text{Hydration Energy}$ to decide which of the overall process of dissolution of $\ce{HCl}$ is exothermic or endothermic.
Similarly, using Hess' Law you can calculate if the acid-base reaction will be exothermic or endothermic.