GANs were invented in a bar somewhere in Montreal, Canada. At said bar, the idea was that neural networks could be used for generating new examples from an existing distribution. This was the problem:
Given an input set X, can we make a new x’ that looks like it should be in X?
The classic description of a GAN is a counterfeiter (generator) and a cop (discriminator). The counterfeiter has the same problem, make a piece of paper look like real currency.
In training a GAN, the input to the generator is random noise, a starting seed so that no 2 results are the same. The generator then makes a new x’.
The input to the discriminator alternates between an actual x and an x’ that the generator made. The discriminator then takes the and decides whether it is part of the set X. The discriminator is then trained using its answer to ensure that it can properly tell the difference between bad counterfeits and elements of X.
When the discriminator makes a decision on an x’ that the generator made, the generator is updated as well, in order to increase its ability to make new x’s that the discriminator will think are in X.
Using this simple framework, these 2 networks works against each other (adversarially) to train each other until the generator is making x’s so well that the discriminator can’t tell the difference between them and the real thing. At this point, the generator can be used to make new pictures of cats or whatever was the goal in the first place.