Discriminator takes input from real data as well as the generated images from the Generator. Real images are fed to the Discriminator to know the features of the real images or as you mentioned to match with the real data to classify the input images as real or fake.
Please let me know if the explanation was helpful