How does the Space Shuttle's docking system work?
The ODS is pretty much an "improved" version of the APAS docking port used by the Russians.
It essentially consists of two almost equal halves, one on the active spacecraft (Shuttle), the other on the passive spacecraft (ISS). Active and passive can change, if required.
Each docking system has three petals pointing inside installed an a ring with shock absorbers, that can be extended. Only the ring of the active spacecraft gets extended before docking.
The petals fit between the petals of the opposing spacecraft and act as coarse and fine guides for making the docking ports line up during docking, as long as you approximately hit the docking port at the right angle and in the center.
The extended docking ring acts as shock absorber - the 100 ton Shuttle impacting at 2.5 cm per second has the same impulse as a 1 ton car impacting at 2.5 m/s (Which is walking speed). Pretty strong impact for the slow speed. Additionally, the Shuttle fires its thrusters for 3 seconds to push itself against the ISS while the docking system hooks the spacecraft together.
Once the petals have correctly aligned and the extended ring of the active spacecraft and the retracting ring of the passive spacecraft have contact, hooks on the active spacecraft close and fit into its counter parts on the passive spacecraft, pulling the rings ultimatively together and create a fixed connection between the rings. This state is called soft-docking, since the extended ring can still move and damp oscillations between the spacecraft.
Next, when the oscillations have been damped out by the shock absorbers, the ring is retracted. Now the two actual docking ports are pulled together, creating an air tight seal between the spacecraft, making electrical connections, etc. Once both spacecraft are tightly connected and can no longer more relative to each other, you have hard-docking achieved. Now, only massive force can separate the two spacecraft, before the spacecraft undocks.
After docking, the astronauts usually disassemble the petals of the docking port for having more room to move. The petals are no longer needed, the outer ring of the docking ports hold the spacecraft together.
For undocking, one spacecraft simply has to release its hooks and latches and four pairs of springs will push the spacecraft away. Which spacecraft does that is not important, usually the Shuttle did it, but if the Shuttle would have had a malfunction, the ISS could also release it.
The successor of the ODS is the IDS (International docking system) formerly known as LIDS (low impulse docking system). It uses microcontrollers for active shock absorbers to reduce the minimum speed for docking and will also permit refueling operations. It will also have a stronger connection between the docked spacecraft, comparable to the CBMs of the ISS.
The difference between docking and berthing is really simple: Docking is temporary and can be changed quickly in emergency, berthing is relatively permanent, you need a lot of time for disconnecting.
Often, it is even just a differences between which identical port you use: The Russian Berthing ports have only tiny differences to the docking ports, but are just not lined up with the guidance systems for automated docking.
---------- Post added at 02:16 PM ---------- Previous post was at 02:13 PM ----------
Not shown: The ring being retracted, creating a hard seal between the PMA and the Shuttle. IIRC it is this retraction that creates the post-docking pneumatic banging noises heard in the Orbiter Sound plugin.
The sound is from Apollo, not the Shuttle. The banging noises there are the sets of latches hooking together on the Apollo spacecraft for achieving hard docking. Retraction is pretty silent on both spacecraft.