How the original Otis elevator worked
Artwork: The Otis elevator. Thanks to the wonders of the Internet, it's really easy to look at original patent documents and find out exactly what inventors were thinking. Here, courtesy of the US Patent and Trademark Office, is one of the drawings Elisha Graves Otis submitted with his "Hoisting Apparatus" patent dated January 15, 1861. I've colored it in a little bit so it's easier to understand.
Greatly simplified, here's how it works:
The elevator compartment (1, green) is raised and lowered by a hoist and pulley system (2) and a moving counterweight (not visible in this picture). You can see how the elevator is moving smoothly between vertical guide bars: it doesn't just dangle stupidly from the rope!
The cable that does all the lifting (3, red) wraps around several pulleys and the main winding drum. Don't forget this elevator was invented before anyone was really using electricity: it was raised and lowered by hand!
At the top of the elevator car, there's a simple mechanism made up of spring-loaded arms and pivots (4). If the main cable (3) breaks, the springs push out two sturdy bars called "pawls" (5) so they lock into vertical racks of upward-pointing teeth (6) on either side. This ratchet-like device clamps the elevator safely in place.
According to Otis, the key part of the invention was: "having the pawls and the teeth of the racks hook formed, essentially as shown, so that the weight of the platform will, in case of the breaking of the rope, cause the pawls and teeth to lock together and prevent the contingency of a separation of the same."
It explains more fully how the winch and pulleys work with the counterweight.
A modern elevator has much in common with the original Otis design. Here you can see the little wheels at the edges of an elevator car that help it move smoothly up and down its guide bars.