Spam refers to electronic messages that are sent in large quantities without prior consent, and are typically unwanted. The primary characteristic of spam is the repetitive and uninvited nature, targeting a broad range of recipients. Spam messages typically contain promotional content, scams, or malware, with the intention of advertising products, services, or deceiving individuals for financial gain.
While spam is commonly associated with messaging functionality, it can occur on any platform that allows one user to insert content into another user's view, including comment sections and content recommendation systems.
Spam is a challenging problem to deal with because it is highly contextual. If a user gets an email for a coupon for a service they've used before, they might consider that to be a welcome and useful communication. However, a different user who hasn't used the service before might consider it spam, even more so if they get the offer multiple times.
Spam is the original integrity issue on the internet: any exchange of information can be used by the sender for commercial intent, and can be undesired by the recipient. From the ensuing decades of combating spam, a wide range of interventions have been devised and implemented. Most useful against the problem have been the dual approaches of Affinity (marking messages from unrelated parties as more likely to be spam), and user moderation (relying on user reports of spam as a signal for user preferences, which tend to be consistent across users on this inherently subjective question of "unwanted").