Tarot originated as a game in 15th century Italy, by adding to a normal deck of cards 21 trump cards, a fool, and 4 queens of each suit. Some early Tarot decks of North Italian origin, which date to the early to mid-15th century have remained. These were called carte da trionfi or "cards of the triumphs". Soon afterwards, the cards came to be known as Tarocchi. It is unknown when the tarot was first used for divination. As early as 1540, a book entitled The Oracles of Francesco Marcolino da Forli shows a simple method of divining from the coin suit of a regular playing card deck. Manuscripts from 1735 (The Square of Sevens) and 1750 (Pratesi Cartomancer) show rudimentary divinatory meanings for the cards of the tarot, as well as a system for laying out the cards. In 1765, Giacomo Casanova wrote in his diary that his Russian mistress frequently used a deck of playing cards for divination. In 1781 Antoine Court de Gébelin wrote a speculative history and a detailed system for using the tarot to fortell the future. From Gébelin's time forward, various explanations have been given for the origins of tarot, most of them of doubtful veracity. There is no evidence for any tarot cards prior to the hand-painted ones that were used by Italian nobles, but some esoteric schools believe its origins could be in Ancient Egypt, Ancient India or even in lost continent Atlantida.
Early Tarot decks
The relationship between Tarot cards and playing cards is well documented. Playing cards appeared quite suddenly in Christian Europe during the period 1375–1380, following several decades of use in Islamic Spain: see playing card history for discussion of its origins. Early European sources describe a deck with typically 52 cards, like a modern deck with no jokers. The 78-card Tarot resulted from adding 21 Trumps and the Fool to an early 56-card variant (14 cards per suit). A greater distribution of playing cards in Europe can with some certainty be given for the year 1377 and the following years. Tarot cards only developed some 40 years later, and they are mentioned, possibly for the first time, in the surviving text of Martiano da Tortona (it can be found in translation on the Web). Initially, tarot cards were only known as "trionfi" (triumphs). Only later did the name "tarocchi" appear.
The likely date for da Tortona's text is between 1418 and 1425, since in 1418 the confirmed painter Michelino da Besozzo returned to Milan, and Martiano da Tortona died in 1425. It cannot be proven, of course, that Tarot cards did not exist earlier, but it seems improbable, because the date of the Martiano da Tortona text is at least 15 years earlier than other clear confirming documents. Da Tortona describes a deck similar to Tarot cards in specific points, but in other ways quite different. What he describes is more a predevelopment to Tarot than what we might think of as "real" Tarot cards. For instance, it has only 16 trumps; its motifs are not comparable to common Tarot cards (they are Greek gods); and the suits are not the common Italian suits, but four kinds of birds.
What makes da Tortona's deck similar to Tarot cards is that these 16 cards are obviously regarded as trump cards in a card game, and that, about 25 years later, a nearly contemporary speaker, Jacopo Antonio Marcello, called them a "ludus triumphorum" — a term that is regarded as a relatively certain indicator of Tarot-similar objects when it appears in relation to playing cards. The letter in which Marcello uses this term is documented and translated on the Web.
The next documents that seem to confirm the existence of objects similar to Tarot cards are two playing card decks from Milan (Brera-Brambrilla and Cary-Yale-Tarocchi) — extant, but fragmentary — and three documents, all from the court of Ferrara, Italy. The playing cards are naturally not precisely datable, but it is estimated that they were made circa 1440. The three documents are from 1 January 1441 to July 1442, with the term "trionfi" first documented in February 1442. All are documented on the Web. The provenance of the document from January 1441, which used the term "Trionfi" not, might be regarded as insecure, however, certain circumstances make it plausible, that it already was a deck of this developing type (same painter: Sagramoro, same commissioner: Leonello d'Este as in the document of February 1442); this is discussed on the site. After 1442, a longer pause (seven years) occurred without any confirming material, which doesn't give any reason to assume a greater distribution of the game in these years.
Till this time all relevant early documents point to an origin of the Trionfi cards (later Tarocchi cards) in the upper class of the society in Italy, and specifically to the courts of Milan and Ferrara. At the time, these were the most exclusive courts of their time in Europe. The number of existing decks might have been quite small. The game seems to gain in importance in the year 1450 -- a Jubilee year in Italy, which saw many festivities and traffic of pilgrims. The following frequent documentary evidence of the decks in the period from 1450 to 1463 is documented on the Web at the same place.
In the given context, it's obvious that the special motifs on the trumps, which were added to normal playing cards with a usual 4x14-structure, were ideologically determined. They have been thought to show a specific system that could transport messages of different content; known early examples show philosophical, social, poetical, astronomical and heraldic ideas, for instance, as well as a group of old Roman/Greek/Babylonian heroes that could serve as content as in the case of the Sola-Busca-Tarocchi and the Boiardo Tarocchi poem. For example, the above-mentioned earliest-known deck, extant only in its description in Martiano's short book, was produced to show a Greek gods system (an ideological idea at a time when Greek content was taken in Italy with some enthusiasm). Very likely its production accompanied a triumphal festivity of the commissioner Filippo Maria Visconti, which means the deck had the concrete function of expressing and consolidating the political power in Milan (as common for the time also in other productions of art). The 4 suits showed birds, which appeared regularly in common Visconti-heraldic, and the used specific order of the gods gives reason to assume, that the deck partly should focus, that the Visconti identified themselves as descendants from Jupiter and Venus (which were - as in this time usual - seen not as gods, but as heroes, which were deified once).
This first known deck seems to have had the usual 10 number cards, but kings only and only 16 trumps — the later standard (4x14 + 22) wasn't settled and still in 1457 a document is known, which speaks of Trionfi decks with 70 cards only. Till the Boiardo Tarocchi poem (produced at an unknown date between 1461 and 1494) and the Sola Busca Tarocchi (1491) any confirming evidence for the final standard form with totally 78 cards is missing.
Individual researchers' opinions formulate cause these facts in the current moment, that the Trionfi decks of the early time had mostly 5x14 cards  only and that the row of trumps and fool were simply considered as a 5th suit with predefined trump-function.
The oldest surviving Tarot cards are three early to mid-15th century sets, all made for members of the Visconti family, rulers of Milan. The oldest of these existing Tarot decks was perhaps painted to celebrate a mid-15th century wedding joining the ruling Visconti and Sforza families of Milan, probably painted by Bonifacio Bembo and other miniaturists of the Ferrara school. Of the original cards, 35 are in the Pierpont Morgan Library, 26 cards are at the Accademia Carrara, 13 are at the Casa Colleoni, 4 cards (the Devil, the Tower, the Three of Swords, and the Knight of Coins) being lost or possibly never made. This "Visconti-Sforza" deck, which has been widely reproduced in varying quality, combines the suits of Swords, Staves, Coins and Cups, and face cards King, Queen, Knight and Page with trumps that reflect conventional iconography of the time to a significant degree
For a long time Tarot cards remained privileged to the upper class of society. The Roman Catholic Church and most civil governments did not routinely condemn tarot cards during tarot's early history. In fact, in some jurisdictions, tarot cards were specifically exempted from laws otherwise prohibiting regular playing cards. However, some sermons inveighing against the evil inherent in cards can be traced to the 14th century.
Later Tarot decks
As the earliest Tarot cards were hand-painted, the number of the produced decks is considered to have been rather small. Only after the invention of the printing press mass production of cards became possible. Decks from this era survive from various cities in France at various times (the best known in this context being the city of Marseille, in southern France) perhaps from the early 16th century, though actual surviving examples are no earlier than the 17th century. At around the same time, the name "Tarocchi" appeared.
Carl Jung was the first psychologist to attach importance to Tarot symbolism. He may have regarded the Tarot cards as representing archetypes: fundamental types of person or situation embedded in the subconscious of all human beings. The Emperor, for instance, represents the ultimate patriarch or father figure.
The theory of archetypes gives rise to several psychological uses. Some psychologists use Tarot cards to identify how a client views himself or herself, by asking the patient to select a card that he or she identifies with. Some try to get the client to clarify his ideas by imagining his situation or relationship in terms of Tarot ../images: Is someone rushing in heedlessly like the Knight of Swords perhaps, or blindly keeping the world at bay as in the Rider-Waite-Smith Two of Swords? The Tarot can be seen as a kind of algebra of the subconscious (see Freud), allowing it to be analysed at the conscious level. Like most "New Age" therapies, however, Tarot cards are not widely used by mainstream psychologists. Although Jung and Freud are still seen as important innovators, the majority of psychologists today are quite critical of many aspects of their theories.