Optical sensing systems can measure changes in distance, force, temperature, and a variety of other physical characteristics. There are four different modulations to optical signals that are used for sensing: intensity, phase, frequency, and polarization. Intensity measurements are the easiest to perform though they may not be as sensitive to interferometric techniques, where a reference path is compared to a test path and the interferrence pattern due to a phase shift is measured.
Optical sensing has many advantages over other technologies including its immunity to electromagnetic interference, high sensitivity, high speed, contact and non-contact modes of operation, and wide range of costs (including rather inexpensive!)

We will concentrate on intensity modulation here, as it is the easiest to implement and doesn't need a laboratory setup. Note that phase, frequency, and polarization techniques often use intensity measurements, in the end.

Given a light source and a light detector (be it in the visible spectrum, above or below) we can convert the amount of light impinging upon the sensor into a voltage or current. If two sensors are used, one can measure the differential signal between the two sensors and thus reject the common mode and much of the noise or ambient light. By changing the distance or angle between the two sensors, the detected intensity will change. By changing the transmissivity of the light path, the detected intensity will change. Note that photo-detectors may have a broad spectrum that can be detected, and that the sensitivity of a given detector may not be the same for all frequencies of light. This means that a detector will react differently to a blue light source than it will to a red light source for the same intensity of light. (Remember, the energy of a photon is proportional to its frequency, not its amplitude.)

Fibre optic (or fiber optic, depending on your country of origin) cables are made of cylindrical lengths of glass, quartz, or plastic (or other low-loss material) with a high index of refraction core covered by a lower index of refraction cladding (which is usually enveloped in a jacket for protection and does not play a role in the transmission of light).
With this structure, light can be injected into the fibre's core at one end, and through total internal reflection, almost all of the light can be conveyed to the other end with very little loss.
If the fibre is bent such that rays incident on the core-cladding interface have an angle greater than the critical angle (using Snell's law), then the ray will be refracted as it passes into the cladding and not reflected back into the core.
By “treating” the fibre (by changing the ratios of index of refraction at the core-cladding interface) bend sensors can be created which exaggerate the aforementioned phenomenon, causing more light to be lost when the fibre is bent than when it is straightened.
Other types of sensors can be formed using pairs of optical fibres where their alignment, spatial separation, and emission/collection patterns can be tuned to create force, distance, position, and pressure sensors.