Smoke Testing: Is usually perforformed before passing on build to testing team. Smoke Testing is performed to make sure that build is stable enough to be tested.
Sanity Testing: is usually performed to make sure that bugs/ user stories are sucessfully working in build. Sanity Testing is performed usually before UAT and Regression.
Both smoke testign and sanity testing are used to save testing team's time.