What is this detector?
It's it's non contact and magnetic then it's very likely it's a reed switch.They work by shorting the contacts when the magnet is near. 

For use by a microcontroller you can wire them up exactly like a pushbutton.

They don't support high currents so if you want to use them as direct switches you will need some kind of buffer.