Deepfakes are fake videos and images created using artificial intelligence techniques to manipulate or replace a person's face with another. They work by training autoencoders to recognize facial features and compress them into a latent space that can be used to generate fake images by replacing one person's facial features with another's. Popular targets of early deepfakes were celebrities, but the technique could potentially be used for both positive and negative purposes to manipulate media.