This is a simple to use magnet sensor. Consists of a Magnet and a Magnetic Sensor(the one with two wires). The sensor has a simple switch within it whic gets activated in the presence of a magnet. This sensor can be used with other commonly available magnets also.
This sensor is perfect for use in general magnet sensing applications, encoders, etc.