Spin, in the context of public relations (PR), marketing and journalism, is the selective assembly of fact and the shaping of nuance to support a particular view of a story.
Spin is considered one form of propaganda. To spin something is to communicate it in a way that changes the way people are likely to perceive it. As such, spin is intentionally misleading and can, in fact, give the opposite impression to what would naturally occur. Outright lies cannot be considered spin. However, inconvenient but relevant truths are often omitted in the process and less relevant but true details emphasized.
Spin is often used for corporate reputation management and has long been used to market products. Vendors use cloudwashing, for example, to take advantage of the cloud trend by associating their products with it -- even though the justification may be nothing more than the fact that some element of the product relies on the Internet. Similarly, greenwashing is used to make a product or company appear to be more environmentally-friendly than is the case.
The use of the word spin in this context comes from its connection to storytelling, as in "spinning a yarn." The first documented example of that phrase is from 1812, as a sailor's expression for telling a story while performing some task like yarn-spinning or twisting.
See also: In physics, spin is the velocity of rotation of something around a particular axis. Spin is sometimes called angular momentum.