Don Quixote believes that the windmills really were giants—but that they were turned into windmills by his nemesis, a magician named Friston.
The windmills that Don Quixote spots in the distance are always windmills; they're never giants. But Don Quixote is so convinced that they're windmills that he attacks them. Doing so breaks his lance and throws both him and his horse into the air.
After he's helped up by Sancho Panza, he has to explain why the giants are gone and only windmills are in their place. Instead of recognizing that he's made a mistake, Don Quixote insists that the windmills were once giants. He says that Friston—the same person he thinks stole his books—turned them into windmills. Don Quixote says that the magician did so to deprive Don Quixote of the honor of slaying the giants.
Sancho Panza recognizes from the beginning that the things in the distance are windmills.