You’re describing visual hallucinations. These are often part of a syndrome termed psychosis but can also occur in other situations (e.g. alcohol withdrawal, intoxication with a variety of substances, delirium due to a medical condition).*
Schizophrenia is the name of a particular psychiatric disease characterized by psychosis. Hallucinations themselves are a symptom, not a disease.
The perception of an object or event (in any of the 5 senses) in the absence of an external stimulus.
Psychosis occurs when a person loses contact with reality. The person may:
- Have false beliefs about what is taking place, or who one is (delusions).
- See or hear things that are not there (hallucinations).
*In response to the updated question: Occasionally in healthy people (and more often in those with narcolepsy), visual hallucinations occur at the border between wake and sleep, then termed hypagogic or hypnopompic hallucinations. This is a type of parasomnia and is most common in young people who are sleep deprived.