In a GAN, there are two neural networks: a generator and a discriminator. The generator creates data that is similar to the training data, while the discriminator tries to distinguish between the real training data and the generated data. The two networks compete with each other, and as they do, the generator gets better and better at creating data that looks real.