Liquid molecules are always in thermal motion, and the molecules on the liquid surface are separated from the liquid surface due to thermal motion, so the molecules on the surface are sparse.
Due to the increase of molecular distance, the intermolecular force on the liquid surface shows attraction and macroscopic surface tension.