What is google docs solution to handling multiple users editing and reading at the same time?
Note: there is no way to know how Google does it. All we can do is speculate based on whatever information is publicly available. If you want to know, you have to ask them, not us.

Google Docs' collaborative features are reportedly an offshoot of Google Wave. Google Wave, in turn, reportedly used Operational Transformation.

As a very high-level basic overview, the fundamental idea behind OT is that each collaborator has their own local copy of the document, and the editor infers an operational transformation based on the user's inputs. These transformations can be very simple (insert character x at position y) or more complex (perform an extract method refactoring of the second code block in method foo and name the resulting method bar).

These transformations are then broadcast to the other collaborators and applied to their respective copies.