Try this website:
http://www.howstuffworks.com/
Try different search terms until you find what you're looking for.
=)
how do they work ?
A trick many employ to open and close gates: they use an endless helical drive screw, so the motor turns the screw only one way. It has limit switches on each end to shut off motor.