Time of Flight
In phones, time-of-flight refers to a category of sensors that measure the precise distance between the sensor (in the phone) and external objects in front of the sensor. The measurement is made by emitting a special light beam invisible to the human eye and measuring the time it takes for that light beam to make the round-trip from the sensor to the object and back, reflecting off the object.
The most advanced ToF sensors employ special cameras to make thousands of ToF measurements at once, generating a relatively accurate 3D map of objects in front of the sensor. This can be used for facial recognition as well as AR (augmented reality) applications.
Simpler ToF sensors only make a single distance measurement, directly in front of the sensor. These are often used in phones as proximity sensors, to determine whether a phone is being held up to a head or in a pocket, etc.