The nervous system receives information about the internal and external environments through a chemical or physical stimulus.
External environments are sensed by taste, touch, hearing, sight and smell. Stimuli for taste and smell are both chemical substances (molecules, compounds, ions, etc.), touch and hearing are physical stimuli, sight is light stimuli.
Internal environment can also be sensed by the nervous system. For example, the stretch of an organ wall or the concentration of certain ions in the blood.