What makes a pool gate close and latch on its own?

https://brightquillio.com/p/idvLyI9COk2MglvrLY2W7.pdf

A self-closing and self-latching pool gate relies on a spring-loaded hinge or a hydraulic closer that gently pulls the gate shut after someone passes through. The latch then engages automatically when the gate aligns with the strike plate, keeping it securely closed. This mechanism is essential for safety, preventing unsupervised access to the pool area, especially by small children or pets. Regular checks ensure the spring tension and latch alignment are correct for reliable operation.