A quine is a program which outputs its source code when run. They are essentially useless, but pretty cute. This is what a quine looks like in English:

"quoted and followed by itself is a quine." quoted and followed by itself is a quine.

This might be easier to read if it is written as Bob quoted and followed by itself is a quine. Letting Bob stand in for quoted and followed by itself is a quine.

Quines are named after Mr Quine, surprise, who was a logician and philosopher. He used the same sort of trick to recreate the liars paradox without using the word this. For completeness here it is:

"yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.

On to the programming, here is quine in haskell:

main = putStrLn $ (\x -> x ++ show x)"main = putStrLn $ (\\x -> x ++ show x)"
And here is one in python:
s="""print 's=""%s"";%s' %('"'+s+'"',s)""";print 's=""%s"";%s' %('"'+s+'"',s)
Worst abuse of quoting ever? Perhaps. I wrote it before I discovered repr (backticks) makes this a lot easier.

Once you get the hang of it quines are pretty easy to write. They basically need a way of quoting or escaping a string so code inside it will not be interpreted, and a way of outputting the quoted and unquoted string. For the record, locating and reading the source code from disk or something similar is usually not acceptable.

There is of course the infamous shortest quine in the world that was entered in the Obfuscated C Contest. It consisted of a completely empty file which when compiled, produces a program which outputs the source, i.e. nothing. This was deemed an abuse of the rules too hideous even for the Obfuscated C Contest, so they changed it so that the source must contain as least one byte. From the author: "While strictly speaking, smr.c is not a valid C program, it is not an invalid C program either!" Hmm, taking a look at the makefile he doesn't even call gcc on it, the empty file is just copied and made executable, so it will be interpreted as an empty shell script.