Inoculation was a method of minimising the harm done by infection with smallpox. It was the predecessor of vaccination - though nowadays the terms are used more or less interchangeably for the process of immunisation aginst disease.
The basic principle of inoculation was this: if someone were deliberately infected, generally by rubbing material from a smallpox pustule into a scratch on the arm, the recipient would develop smallpox. However, because the infection did not take place by the normal route of infection, what developed was a particularly mild form of smallpox, which had a far lower mortality rate than catching smallpox in the normal way, and left an immunity to later reinfection. The inoculated subject also usually recovered from the infection with far less facial scarring than was the case with naturally acquired smallpox.
Where the practice began is unknown; it had been practiced in various manners in India and China for centuries. Its adoption in Europe is well documented: In the 18th century, Lady Mary Wortley Montague was the wife of the English ambassador to Turkey, and she saw this being done in Constantinople. She was very impressed, having lost a brother from smallpox and having been scarred by it herself, and in March 1718 she had the embassy surgeon, Charles Maitland, inoculate her five year old son. In 1721, after returning to England, she had her four year old daughter inoculated. She invited friends to see her daughter, including Sir Hans Sloane, the King's physician. Interest was sufficiently aroused that Maitland was granted permission to test inoculation on six condemned prisoners at Newgate prison, witnessed by a number of notable doctors. The trial was successful; the prisoners were granted their freedom, and in 1722 the Prince of Wales' daughters were inoculated. The practice of inoculation slowly spread amongst the royal families of Europe, usually followed by the more general adoption amongst the people. The Ayurvedic system of inoculation against smallpox was described by J.Z. Holwell to the College of Physicians in London in 1767 in a tract called An account of the manner of inoculating for the small pox in the East Indies. This account was based on observations made during his residence in Bengal.
In France, there was considerable opposition to the introduction of inoculation: Voltaire, in his 'Lettres Philosophiques' wrote a criticism of his countrymen for having so little regard for the welfare of their children. (English translation on line at http://www.bartleby.com/34/2/11.html)
Smallpox was so prevalent that it was almost inevitable that one would be infected by it sooner or later, and the advantages of inoculation were so evident, that parents would pre-empt the dangerous natural infection by the less risky use of inoculation; but Edward Jenner's use of the far safer cowpox in vaccination eventually led to the smallpox inoculation falling into disuse.