When the gate is unlatched, the stainless spring forces the bolt action out, away from the latch receiver. When the gate is pushed closed, the high power magnet pulls the bolt into the receiver, making it a self-closing latch.
eBay