The history of solitaire
Solitaire began as "patience", a quiet card game for one in 18th-century Europe. Two hundred years later a version that came free with Windows became one of the most played computer games ever made.
The first patience games
The earliest known description of a patience game appears in a German book of card games from the 1780s, Das neue Königliche L'Hombre-Spiel. Sources disagree about which edition it first appeared in (1783 and 1788 are both cited), but they agree that patience was already being played in German-speaking Europe by then. In its early days, patience was sometimes played by two people racing each other, and some writers link it to fortune-telling with cards, though how strongly is debated.
Over the 19th century the games spread through Scandinavia, France and the rest of Europe. Many classic layouts still carry French names, such as La Belle Lucie, a sign of how popular patience became in France.
Napoleon and other legends
A popular story says Napoleon passed his exile on Saint Helena playing patience, and several games carry his name. Historians have found little evidence for it. The names are better read as a sign of the fashion for patience in the decades after his death than as a record of how he spent his time.
Patience in print
In Britain the games kept the name patience. One of the first English books devoted to them was Lady Adelaide Cadogan's Illustrated Games of Patience, published around 1870, and it was followed by a steady stream of collections. In the twentieth century, Albert Morehead and Geoffrey Mott-Smith's The Complete Book of Solitaire and Patience Games (1949) and David Parlett's The Penguin Book of Patience (1979) became standard references for hundreds of games.
In North America the same games were called solitaire, and the most popular of them took its name from the Klondike Gold Rush of the 1890s. You can read more in the history of Klondike.
Solitaire on computers
Card games were natural for early computers. FreeCell was created in 1978 by Paul Alfille on the PLATO educational computer system at the University of Illinois. The real turning point came in 1990, when Microsoft shipped Windows 3.0 with a Klondike game simply called Solitaire, written by Wes Cherry while he was an intern, with a card deck designed by Susan Kare. Dragging cards around the screen taught millions of people to use a mouse.
More games followed. Microsoft's Entertainment Packs in the early 1990s brought FreeCell, TriPeaks and an Egyptian-themed Pyramid game called Tut's Tomb to Windows. FreeCell came with Windows 95, and Spider arrived in Microsoft Plus! 98. In 2012, Microsoft Solitaire Collection gathered the favorites together, and in 2019 Microsoft Solitaire was inducted into the World Video Game Hall of Fame.
Solitaire today
Today solitaire is played mostly in browsers and on phones, in short breaks and long evenings alike. The appeal hasn't changed since the 1780s: a game you can start in a second, play at your own pace, and that rewards a little patience.