Actually it is a reed switch. You can put a volt meter across it and see the resistance go from infinite to zero when a magnet is nearby.
High end ones might use a hall effect transistor, that would be the smart way to do it. Much more reliable than an inductive loop since a hall effect switch is extremely fast and will give you essentially an on/off switch no matter how slow the magnet is moving (or even if it's stopped altogether). Hall effect transistors are pretty cheap.
It's possible that newer comps have already switched to hall effects, I wouldn't know, my computer is a number of years old at this point.
__________________
Work: the 8 hours that separates bike rides.