Android device have sensor that measure motion, orientation, and various environmental condition. These sensor can help you to play game that might track readings shake, rotation, or swing. A weather application might use a device temperature or travel application like compass might use the geomagnetic field sensor and accelerometer. About sensors, you can read from developer android for more complex information explanation or code.
Smartphone device like android are generally equipped with various sensors with different function. to find out sensors are embedded in the your android smartphone, you can install an application called “Android Sensor Box” from Google Play, which helps you to test those sensor.