Unlocking your phone using your face is the new hotness, mostly thanks to Apple’s Face ID. Android has had a similar feature since 2015 called Trusted Face, but it’s not even close to the same thing.
Apple put a lot of tech into getting Face ID to work in a way that was not only intuitive and accurate but also incredibly secure. In short, it creates a 3D map of your face by using a combination of infrared light and image capture. Forbes did a great job of explaining this: