Inductive sensors use currents induced by magnetic fields to detect nearby metal objects. The inductive sensor uses a coil (an inductor) to generate a high frequency magnetic field as shown in Figure 1 below. If there is a metal object near the changing magnetic field, current will flow in the object.
This resulting current flow sets up a new magnetic field that opposes the original magnetic field. The net effect is that it changes the inductance of the coil in the inductive sensor.
These sensors will detect any metals, when detecting multiple types of metal multiple sensors are often used.
Note: these work by setting up a high frequency field. If a target nears the field will induce eddy currents. These currents consume power because of resistance, so energy is in the field is lost, and the signal amplitude decreases. The detector examines filed magnitude to determine when it has decreased enough to switch.
The sensors can detect objects a few centimeters away from the end. But, the direction to the object can be arbitrary as shown in Figure 2 below.
The magnetic field of the unshielded sensor covers a larger volume around the head of the coil. By adding a shield (a metal jacket around the sides of the coil) the magnetic field becomes smaller, but also more directed. Shields will often be available for inductive sensors to improve their directionality and accuracy.
Reference: Automating Manufacturing Systems with PLCs – Hugh Jack