If you are using one of the varieties with an NPN output, then what you need is:
Blue to ground
Brown to +12v
Black to Arduino input pin
Either enable the internal pullup resistor on the Arduino pin, or connect a pullup resistor (suggest 1K to 10K) between the pin and +5v.