when a substance is dissolved in water its crystal structure is ruptured or it looses its lattice form
and since lattice energy is always negative for a substance (because we define it to be the energy that is released during the formation of its lattice ) when the lattice is broken energy needs to be supplied and that is gained through the hydration enthalpy .
now since hydration enthalpy is less than lattice enthalpy (numerically) the full energy is not gained through hydration enthalpy and hence it takes it from the surrounding by absorbing heat and hence cools down.