To understand how a floating dock works, it is essential to first understand how a dock stays afloat. Basically a dock will stay afloat if it is buoyant. Buoyancy is summarized by Archimedes' Principle as the condition when, "any object whole or partly immersed in a fluid, is buoyed up by a force equal to the weight of the fluid displaced by the object." The article "How a Dock Stays Afloat" has more specific details on dock flotation if you are interested. At any rate, knowing that dock sections stay afloat because of buoyancy and buoyancy devices makes it possible to explain how a floating dock works.
The Dock Sections
A floating dock usually consists of two or more dock sections that start at the shoreline of a lake or ocean and go out into the water. Generally, the further out from the shore that the water stays shallow, the longer the dock must be. The reason for this is that most docks are used for boat docking and access and if the water is too shallow a boat will not be able to drive up to the dock. Once it is determined how far out into the water the floating dock needs to go to accommodate boats, the number of required dock sections can be calculated.
Part of what makes a floating dock work is the ability to keep it in place so it does not float away. This is where dock posts come into play, and they must be posts with augers on the bottom so they can be screwed into the lake or ocean bottom (the posts with a flat, lower plate that just sit on the lake bottom rely on the weight of the dock to keep them in place; the buoyancy factor of a floating dock would not work here).
The Floating Dock
To keep a floating dock together and in place, auger posts with connecting cross-supports are used. The dock sections will each have four U-shaped brackets that wrap loosely around the posts at each corner to keep the dock in place yet let it float up and down with waves and motion as needed. In sum, it is the combination of the buoyancy of the dock, the augered posts and the brackets that let a dock float without floating away.