A demo is a program that displays a sound, music, and light show, usually in 3D. Demos are very fun to watch, because they seemingly do things that aren't possible on the machine they were programmed on.
Essentially, demos "show off". They do so in usually one, two, or all three of three methods:
Grant Smith puts it another way:
Jonny looks around, confused, his train of thought disrupted. He
collects himself, and stares at the teacher with a steady eye. "I want
to code demos," he says, his words becoming stronger and more confidant
as he speaks. "I want to write something that will change people's
perception of reality. I want them to walk away from the computer dazed,
unsure of their footing and eyesight. I want to write something that
will reach out of the screen and grab them, making heartbeats and
breathing slow to almost a halt. I want to write something that, when it
is finished, they are reluctant to leave, knowing that nothing they
experience that day will be quite as real, as insightful, as good. I
want to write demos."
Silence. The class and the teacher stare at Jonny, stunned. It
is the teachers turn to be confused. Jonny blushes, feeling that
something more is required. "Either that or I want to be a fireman."
- Grant Smith,
Taken from PC Demos Explained by Trixter of Hornet.