Under the tracks.

US-style switching layout.

This picture shows how uncoupling is done and how switches are thrown.
Click this link or the picture, to see the switch machine details.