The new LiDAR sensor built into iPhone 12 Pro and iPhone 12 Pro Max is designed to function as a '3D camera' that allows the phones to quickly and accurately map the environment around you.
As you may already know, Apple introduced this technology with the 2020 iPad Pro, so it's not exactly groundbreaking news. However, this is the first iPhone to feature this kind of sensor.
In short, the LiDAR scanner is mainly designed to improve Augmented Reality (AR) apps by providing real-time environment mapping in great detail. AR applications can use this data to create much more immersive experiences, as well as more accurate simulations.
The scanner is able to measure distances using reflected light from objects up to 5 meters away (~16.4 feet). Moreover, the LiDAR also allows you to make much more precise measurements using the 'Measure' tool.
Unfortunately, the LiDAR scanner is only available in the Pro and Pro Max versions of iPhone 12, which means you will not get it in the standard or the Mini version.
The LiDAR also brings some improvements in terms of camera focus. You can expect the iPhone 12 Pro and Pro Max to focus on your subjects up to six times faster, even in low-light conditions.
Speaking of which, since the LiDAR does not require light in order to do its job, you can easily get objects in focus even at night. All three rear-facing cameras use this sensor, so you do not have to worry about selecting the right one to take advantage of it.
The combination of better low-light autofocus and a LiDAR scanner opens up the possibility of taking portrait photos at night. As you can see, you can achieve a surprisingly pleasant bokeh effect under the right conditions - mainly thanks to the fast f/1.6 aperture.