In its original meaning Spam is the proprietary name for a type of processed luncheon meat made from pork. The name is a contraction of "SPiced hAM". It was very popular in England during World War II, when fresh meat was in short supply.  It's a luncheon meat, pink, comes in a can, made by Hormel. Most Americans intuitively, viscerally associate "Spam" with "no nutritive or aesthetic value," though it is still relatively popular (especially in Hawaii) and can be found in almost any grocery store. Spam has its own newsgroup, alt.spam.
However, spam has now acquired a completely different meaning, as electronic junk mail or junk newsgroup postings. There is some debate about the source of the term, but the generally accepted version is that it comes from from one episode of Monty Python's Flying Circus, set in a café, which served dishes such as "Egg, spam, chips, spam, beans and spam", and which ended with a song which went: "Spam spam spam spam, spam spam spam spam, lovely spam, wonderful spam…" Like the song, spam is an endless repetition of worthless text. 
Another school of thought maintains that it comes from the computer group lab at the University of Southern California who gave it the name because it has many of the same characteristics as the luncheon meat Spam:
- Nobody wants it or ever asks for it.
- No one ever eats it; it is the first item to be pushed to the side when eating the entree.
- Sometimes it is actually tasty, like 1% of junk mail that is really useful to some people.
In video games, spamming refers to repeatedly using one technique or move.