We react, behave and act according to the stimuli that our environment provides for us. When someone says 'Hi', we greet them back, when we see someone, our mind registers it. Similarly, we feel, touch, smell according to the stimuli that is provided. Now imagine that there is no stimuli present and we begin to react. That is hallucination.