What are sensors and how do they work?