The American Psychological Association's Society of Psychological Hypnosis (Division 30) defines hypnosis as "a state of consciousness involving focused attention and reduced peripheral awareness characterized by an enhanced capacity for response to suggestion," a wording quoted by the American Society of Clinical Hypnosis. The paper that set out that definition, by Elkins and colleagues (2015), also defined the induction, hypnotizability and hypnotherapy itself, and left the question of mechanism open for research. Hypnotherapy is that state put to clinical use.
You stay aware the whole time. The Merck Manual describes patients as absorbed and distracted from their surroundings, though not unconscious of them, and notes that some learn to hypnotize themselves. ASCH says most people remember everything that happens in a session, and that only a small share of very deep subjects show spontaneous amnesia.
Practitioners use the state in three broad ways, according to the same ASCH page: imagery, direct suggestions that match what the client wants, and exploration of past events linked to a problem. That third use carries the most risk, because recall under trance can include invented detail, as the last row of the evidence table shows.