How the brain process incoming sensory input

  How does the brain process incoming sensory input? how accurate is its representation of the physical reality? (the phenomenon of inattentional or change blindness) what happens when it receives conflicting or ambiguous information? How does the brain construct (“hallucinate”) reality based on the information it gets?