Don Quixote begins by introducing the main character, Alonso Quehana, who has read so many books about chivalry that "his brains dried up" and he became convinced he was actually a knight. He takes the name Don Quixote de La Mancha and sallies forth into the world to do noble, romantic deeds of chivalry.
There's always a comic element in the story, as Don Quixote's ideas (some might say "delusions") about knighthood clash with the realities of everyday life for the people he meets. Don Quixote's own opinions about knighthood, however, change over the course of the novel.
In the beginning, the story presents Don Quixote's knighthood plans as relatively harmless. One of the first places he encounters is an inn, which he takes to be a castle. His helmet is made of pasteboard and tied on with ribbons, so he can't take it off without cutting the knots. This leads to an odd scene in which he tries to eat dinner at the inn:
A laughable sight it was to see him eating, for having his helmet on and the beaver up, he could not with his own hands put anything into his mouth unless some one else placed it there, and this service one of the ladies rendered him. But to give him anything to drink was impossible, or would have been so had not the landlord bored a reed, and putting one end in his mouth poured the wine into him through the other; all which he bore with patience rather than sever the ribbons of his helmet.
When Don Quixote leaves the inn, the story starts to take a darker turn. One of his first chivalric acts is to save a young servant boy from being beaten by his master. When the master promises not to beat the boy anymore, though, Don Quixote goes on his merry way, leaving the boy with the master—who immediately starts beating him again.
A number of other quests turn out in similarly distasteful fashions. Don Quixote acquires a "squire," a laborer named Sancho Panza, who often bears the brunt of Don Quixote's mishaps.
The novel ends when Don Quixote is vanquished by the "Knight of the White Moon," who is actually an old friend in disguise. Don Quixote swears off chivalry forever.
In writing Don Quixote, Cervantes sought to reveal that romantic ideas about chivalry were nonsense and that books of chivalrous romance were likely to do more harm than good. By creating a character whose chivalrous, romantic ideals are at first harmless but devolve into ever-greater levels of harm, Cervantes plays out this idea through the plot of Don Quixote.