Update: Wikipedia has a list of related acronyms that includes some the original WWII ones listed by Atkinson.

Any programmer will understand the motivation for using foo and bar to name variables. They certainly have been part of the C/UNIX culture from the start, and as @Walter Mitty points out, predated it.

Update (10/5/2009): Here's Atkinson's description:

Their pervasive "civilianness" made them wary of martial zeal. "We were not romantics filled with cape-and-sword twaddle," wrote John Mason Brown, a Navy Reserve lieutenant headed to Sicily. "The last war was too near for that." Military life inflamed their ironic sensibilities and their skepticism. A single crude acronym that captured the soldier's lowered expectations -- SNAFU, "situation normal, all fucked up" -- had expanded into a vocabulary of GI cynicism: SUSFU (situation unchanged, still fucked up); FUMTU (fucked up more than usual); JANFU (joint Army-Navy fuck-up); JAAFU (joint Anglo-American fuck-up); FUAFUP (fucked up and fucked up proper); and FUBAR (fucked up beyond all recognition) [Atkinson, p. 36].

The New Hacker's Dictionary has a very good entry on this - and I consider it to be a better resource for this kind of thing than Wikipedia:

metasyntactic variable /n./

A name used in examples and understood to stand for whatever thing is under discussion, or any random member of a class of things under discussion. The word foo is the canonical example. To avoid confusion, hackers never (well, hardly ever) use `foo' or other words like it as permanent names for anything. In filenames, a common convention is that any filename beginning with a metasyntactic-variable name is a scratch file that may be deleted at any time.

To some extent, the list of one's preferred metasyntactic variables is a cultural signature. They occur both in series (used for related groups of variables or objects) and as singletons. Here are a few common signatures:

foo, bar, baz, quux, quuux, quuuux...:
MIT/Stanford usage, now found everywhere (thanks largely to early versions of this lexicon!). At MIT (but not at Stanford), baz dropped out of use for a while in the 1970s and '80s. A common recent mutation of this sequence inserts qux before quux.

bazola, ztesch:
Stanford (from mid-'70s on).

foo, bar, thud, grunt:
This series was popular at CMU. Other CMU-associated variables include gorp.

foo, bar, fum:
This series is reported to be common at XEROX PARC.

fred, barney:
See the entry for fred. These tend to be Britishisms.

corge, grault, flarp:
Popular at Rutgers University and among GOSMACS hackers.

aap, noot, mies
The Netherlands. These are the first words a child used to learn to spell on a Dutch spelling board.

Of all these, only foo' andbar' are universal (and baz nearly so). The compounds foobar and `foobaz' also enjoy very wide currency.

Some jargon terms are also used as metasyntactic names; barf and mumble, for example. See also Commonwealth Hackish for discussion of numerous metasyntactic variables found in Great Britain and the Commonwealth.

The terms foobar, foo, bar, and baz,
are common placeholder names (also
referred to as metasyntactic
variables) used in computer
programming or computer-related
documentation. They are commonly used
to represent unknown values, typically
when describing a scenario where the
purpose of the unknown values are
understood, but their precise values
are arbitrary and unimportant. The
terms can be used to represent any
part of a complicated system or idea,
including the data, variables,
functions, and commands. The words
themselves have no meaning in this
usage, and are merely logical
representations, much like the letters
x and y are used in algebra. Foobar is
often used alone; foo, bar, and baz
are usually used in that order, when
multiple entities are needed.

Foo has entered the English language
as a neologism and is considered by
many to be the canonical example of a
metasyntactic variable.[citation
needed] It is used extensively in
computer programming examples
(sometimes expressed as "for once
only") and pseudocode. Eric S. Raymond
has called it an "important hackerism"
alongside kludge and cruft.[1]

When used in connection with 'bar' it is generally traced to the
WW II era Army slang acronym FUBAR ('Fucked Up Beyond All
Repair'), later modified to foobar. Early versions of the Jargon
File [JARGON] interpreted this change as a post-war
bowdlerization, but it now seems more likely that FUBAR was itself
a derivative of 'foo' perhaps influenced by German 'furchtbar'
(terrible) - 'foobar' may actually have been the original form.

For, it seems, the word 'foo' itself had an immediate prewar
history in comic strips and cartoons. In the 1938 Warner Brothers
cartoon directed by Robert Clampett, "The Daffy Doc", a very early
version of Daffy Duck holds up a sign saying "SILENCE IS FOO!"...(snip)

The above code lets you fall back on your knowledge of real world things.

If you are trying to explain a concept where the important part is not what is being done (printing meow or bark for example) but on how it is being done then removing the parts that you are familiar help:

In technology, the word was probably originally propagated through system manuals by Digital Equipment Corporation in 1960s and early 1970s. Another possibility is that foobar evolved from electronics, as an inverted foo signal. This is because if a digital signal is active low (so a negative or zero-voltage condition represents a "1") then a horizontal bar is commonly placed over the signal label. The Jargon File makes a case that foo possibly predates FUBAR

"The terms' origins are not known with certainty, and several anecdotal theories have been advanced to identify them. Foobar may derive from the vulgar military acronym FUBAR, or it may have gained popularity due to the fact that it is pronounced the same."

Foo and Bar (otherwise known as FUBAR...F***ed Up Beyond All Recognition) has just been used as standard generic names for things like classes, properties, method names, etc.

Basically the idea is to convey your code without as much extraneous information that could possibly get away from how the code works (i.e. we don't need to know your function is named AddUser to see the code and understand what it does if we rename it to Foo() ).