Spam is the use of electronic messaging systems to send un-solicited bulk messages, especially advertising, indiscriminately across the internet. While Spam is usually associated with email systems, it can also apply to other systems like instant messaging, blogs, wikis, phone messaging and other social media.
While spam is usually associated with unsolicited advertising, it is also used for fraud, social engineering and other crimes.
The legislation for control of spamming is not universal and the laws are different by jurisdiction. A good overview is provided in 'Opt-In Laws in the USA and EU' (http://www.lsoft.com/resources/optinlaws.asp) .