Spam is a type of tinned meat. It is short for "spiced ham". However, in recent years "spam" has taken on a different meaning.
Remember the Monty Python sketch many years ago on TV? In a restaurant, customers were served Spam (the meat) with everything. So, Spam took on a whole new meaning - being inundated with something you do not want.
"Spam" seemed the obvious word for lots of unwanted unsolicited email! Today, the term "spam" is so common that it is listed in the dictionary.
There is a difference, however. Spam the meat, is written with upper case "S". Email spam is written with lower case "s".