Sensors are used to measure a property, such as pressure, position, temperature, gas, substance or acceleration. This information is fed back to an observer or instruments, other electronics or, more specifically, a computer processor.
In the broadest definition, a sensor is a device that detect events or changes in a given environment and sends readings to other electronics.
Sensors versus detectors
Is there a difference between a sensor and a detector? Well, yes, you might say a detector is a sensor. And a sensor can be found inside or part of a gas detector. The difference lies in measurement and detection. Here is an analogy for you. Our skin can detect heat but it can't measure the temperature. Similarly, a galvanometer can detect / sense current but an ampere measures it precisely. A detector only signals the presence of something. A sensor signals the presence and intensity of the stimuli.