LiDAR = "laser imaging, detection, and ranging" or "light detection and ranging"
Read more of the gory details here but in short, it is technology that bounces light rays off of surfaces. Knowing the speed of light, and measuring how long it takes for those light rays reflect back to the sensor, we can measure distance with about +/- 1 inch accuracy.
LiDAR distance equation
d = c x t / 2
Where:
d = distance
c = speed of light
t = time
The LiDAR and camera package on iPad Pros generate a point cloud of thousands of readings that can be converted into a very detailed depth map. Those thousands of readings are happening in every frame of a live video feed as you scan a room (running at 60 frames / second!). The depth field can be visualized below for a single frame where the cooler colors represent a short distance and brighter colors are further away.