As ruben2020 wrote, "Visions are nothing else but dreams".
I suspect that such might be happening all the time, like the air pump in an aquarium that's permanently blowing bubbles; but that usually there's so much other noise (sensory input including sight, sound, and haptic; and discursive thought) that we're not aware of it.
When other turbulence (senses and thoughts) in the aquarium (brain) calms down, then you may become aware of the stream of bubbles (hallucinogenic images).
If you (I use the word "you" here but what I mean is, "in my experience, if I") delight in such an image, "what a delightful image!", then it's possible to keep the image in sight, to pursue the vision: the image becomes replaced with another image, your awareness is filled/taken over by images, and, that's like an ordinary dream-sequence. Maybe I guess doing that (delighting and pursuing) encourages your brain to dream, opens some kind of door or path between the image-bubble-producing part of the brain and the rest of the brain, and allows the images to take over. I imagine that if viewed with an EEG a doctor would see sleep-type or dream-type brain waves taking over.
I think the way I try to 'work with' (i.e. overcome) these hallucinations is:
- Recognize them (e.g. think "Ah yes, that vision of that image is the beginning of a dream")
- Try to remember something else instead, perhaps remember Right View i.e. reason for meditating instead of for 'hallucinating'.
IMO the hallucinogenic images are conditioned and therefore impermanent, unsatisfactory, and anatta.
If it's true that image-bubbles are generated in a continual stream by a mechanism in the brain, why doesn't it dominate our awareness all the time i.e. how do you ever make it go away again?
Imagine it's like a waterfall, making a permanent noise: how would you make that go away? The answer is that you'd move yourself away from it, put some distance or close some doors between you and it.
I think my answer to that is that we learn to control, for example, our hands: you can open and close your hand if you want to: make a fist, make an open palm. There are connections (like paths or currents) between different parts of the brain.
Ideally, when you want to go to sleep for example, then you go to sleep. Your brain reconfigures itself for sleep. Your brain and body begin to go to sleep, you experience symptoms of beginning to sleep, you recognize those symptoms, you like those experiences/symptoms (because you want to go to sleep), you don't resist/discourage/reverse those incremental changes, the changes remain and are added to, and so you move (are moved) into deeper sleep.
I suppose that if you don't like/pursue the images, if you don't encourage (using your will) and therefore reinforce (perhaps by subconscious neurochemical feedback) the state of mind in which they're generated, then they will go away again (being impermanent).
If you're eventually no longer conscious of it, and if the image-bubble machine is nevertheless still ticking away somewhere in the brain, then at least its signals have become more insulated/disconnected from whatever part[s] of the brain my conscious/attention/awareness/self is at. Perhaps you could say I learned to "shut the door" through which those/its images had been manifesting to 'my consciousness'.
I don't have a good answer a) because I don't have a good answer for myself b) because it's difficult to describe. I think it's a difficult question to answer: like asking, "how do you see? how do you open your fist when you want to?" I think it's a good and important question and I hope I've at least added to a description of the problem.