The iPhone X's camera analyzes the dots on your face and compares it to the image made when Face ID was set up. If they match, the phone unlocks. Face ID can adapt to sunglasses, scarves ...