Hypnosis is a state of deep relaxation which has unusual properties. One is posthypnotic amnesia, which is not remembering what happened while under hypnosis, and another is posthypnotic suggestion, which is the implantation of a certain way that someone will act upon cessation of the hypnotic state.
There are three major theories of how hypnosis works, although it is not entirely understood. The first is the psychosocial Role Theory, which relies on the idea of Hypnotic Suggestibility. People with high Hypnotic Suggestibility tend to be very imaginative, fantasy-oriented, obedient, and able to concentrate on a single task for an extended period of time. These factors suggest that hypnotism is a social occurrence in that someone under hypnotism is merely acting how they feel a person under hypnosis should act and only following the suggestions of the hypnotist because they believe that they should do so. This accounts for the assertion from Vespa that only people who believe that hypnosis exists can be hypnotized.
Another theory is State Theory, in which researchers believe that hypnosis is a state of consciousness separate from the conscious (what you are immediately aware of), non-conscious (what you aren't aware of but is still occurring: heatbeat, breathing etc.), preconscious (memories you're not accessing, like your mother's maiden name), subconscious (information we're not aware of, but has to exist in memory because of behavioural clues, like mere-exposure effect), unconscious (the Freudian area of the mind where thoughts that are repressed from consciousness live), and sleep. This theory tries to explain why hypnosis has dramatic health benefits in certain people like pain control or why some people's repressed memories from the unconscious mind seem less inhibited during hypnosis than during consciousness, and also how hypnotists are able to control the level of awareness of a hypnotized person. This theory is quite vague.
Ernest Hildegard's Dissociation Theory of hypnosis suggests that hypnosis causes voluntary division of consciousness. This allows one part of consciousness to respond to the hypnotist, while another part, completely unaware of the other, will stay focused on reality. He did an experiment in which he asked hypnotized subjects to dip their arms in a bucket of very cold water. Under hypnosis, the subjects felt no pain until it was suggested by the hypnotist that they should take their arm out of the water if they felt any pain.