Compass or magnetic sensor is related to the Earth's pole. The sensor uses a type of magnet that interacts with the earth's magnetic field and points in that direction. Originally used for navigation, nowadays smartphones are using magnetic sensors quite well. However, the use of this sensor in low-cost smartphones is not very noticeable. The presence of this sensor can be noticed only in the phones which have the navigation feature . All in all , the job of a magnetic sensor is to show where your position is by comparing it to different poles of the earth . That is to say, the sense that we determine the location of the GPS of the smartphone or tablet , basically this work is done. In addition to location detection, this sensor is also used for various games and applications.