A hallucination was the perception of something that was not present.
Hallucinations were a side effect of the Klingons' thought-shield, especially to James T. Kirk and Montgomery Scott when they visited Organia (which was confined in one) in 2269. (TOS novel: Spock Must Die!)
In 2326, Cadet Jean-Luc Picard at first thought his sightings of Delcara were hallucinations. (TNG novel: Vendetta)
In 2369, Doctor Beverly Crusher discovered that Pelavians exhaled chemicals which caused hallucinations in Humans when inhaled. (TNG short story: "On the Scent of Trouble")