If so, please tell me and also tell me if any interfacing of other microcontroller needed?
closed as unclear what you're asking by Madivad, dlu, Nick Gammon♦ Feb 19 '16 at 9:00
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
I can't comment yet but you probably are looking for a hall effect sensor.
Something like this is a simple version of the sensor. https://www.sparkfun.com/products/9312
You can then do a digitalRead on the DO pin to detect if a magnet is near the sensor.
You would connect the Vdd to 5v arduino supply and GND to the GND of the board.
If you don't care about measuring the strength of the magnetic field, you can use a magnetic switch (sometimes called a reed switch). A magnetic switch closes when a magnet is put up to it and opens when there is not. The only problem with this is that the magnet has to be within about one inch from the switch. The magnetic switch works just like a normal switch and usually has two contacts. Here is an example.