A supposed magical charm previously uttered by magicians. More recently a general term for trickery or magic.
From the early 17th century onwards 'hocus pocus' (now more often spelled as a single hyphenated word) has been used as an incantation by conjurers when performing tricks. Hocus-pocus is now treated like abracadabra, shazam and 'izzy-wizzy, let's get busy' that is, as stage patter, used mostly by comedy magicians. When it was first coined though magicians could reasonably have expected that such exotic-sounding phrases would fool some of the audience into the believing that mysterious forces were being conjured up. In fact, now and then, these 'charms' provide that essential element required for all conjuring tricks - distraction.
The expression began to be used in relation to conjuring in the 1620s and, in 1634, a book entitled 'Hocus Pocus Junior - The Anatomy of Legerdemain' was printed. The author isn't named but was later known just as Hocus Pocus after the book's title.
Conjurers didn't limit themselves to the phrase hocus pocus in their stage patter. In 1656 Thomas Ady, published 'A Candle in the Dark'. In that he gives an example of a longer string of the cod latin used by jugglers (as conjurers were then called):
The first [feature that juggling consists of] is profitably seen in our common Juglers, that go up and down to play their Tricks in Fayrs and Markets, I will speak of one man more excelling in that craft than others, that went about in King James his time, and long since, who called himself, The Kings Majesties most excellent Hocus Pocus, and so was he called, because that at the playing of every Trick, he used to say, Hocus pocus, tontus talontus, vade celeriter jubeo, a dark composure of words, to blinde the eyes of the beholders, to make his Trick pass the more currantly without discovery...
As one who was employed in the unmasking of witches Ady took a professional interest in their craft. He had little faith is the audience - silly wenches he calls them - having the ability to distinguish between the juggler's tricks ('lying miracles') and what he viewed as the true miracles of Christ. This was a life an death matter for those concerned. If the jugglers could be dismissed as performing sleight of hand tricks then they were just stage entertainers. If they were thought to be using actual magic powers they were clearly witches and had a grim, and short, future ahead of them.
Even in 1656 Ady was wise to the techniques that are still used by conjurers to baffle us today. In his book he asks 'Why with their Inchantments?' and answers his own question with:
Not that Jugling and Inchanting are one and the same imposture, but the reason is, because when they wrought a Jugling Trick, or lying Miracle, they always spake a Charm, or Inchantation immediately before it, like to that of our English Jugler aforesaid, to make the delusion the stronger, by busying the senses of Hearing and Seeing in the Spectator both at once, for a Charm, or Inchantation was only a composure of words to delude people, who thought that words spoken in a strange manner had vertue and efficacy in them
That is, he understood the distraction technique ('busying the senses') for what it was.
Why 'hocus pocus'? One attempt at an explanation of the origin comes from John Tillotson, Archbishop of Canterbury in 1694. In his 'Sermons' he suggests that it is a parody of the consecration of the Catholic Mass:
"In all probability those common juggling words of hocus pocus are nothing else but a corruption of hoc est corpus, by way of ridiculous imitation of the priests of the Church of Rome in their trick of Transubstantiation."
In suggesting that both conjurers and Catholic priests were tricksters we can hardly view Archbishop Tillotson as an objective judge. There doesn't seem to be any substance in his supposition, which isn't supported by any evidence or other citations.
The conjurers clearly needed patter that sounded exotic and magical, so commonplace words were of little use. It's likely that hocus pocus is one of the many phrases made from pairs of nonsense words that have been coined for no better reason than that people enjoy rhyming.
Hocus is thought to be the source for the verb hoax. That doesn't appear until 1796 though and, although the link seems intuitive, there is no direct evidence to link the two words.
See other reduplicated phrases.