iCloud documents are cached locally in ~/Library/Mobile Documents
(~
represents your home folder).
They're synchronized via HTTPS (even when the application is closed) and the files (some of them, at least), are stored on Amazon S3.
When opening, editing and saving a TextEdit document from iCloud, these requests are made :
POST
request to https://p**-ubiquity.icloud.com/ub/*********/rwsync/********…
POST
request to https://p**-content.icloud.com/*********/authorizePut
PUT
request to Amazon S3
POST
request to https://p**-content.icloud.com/*********/putComplete
POST
request to https://p**-ubiquity.icloud.com/ub/*********/rwsync/********…
POST
request to https://p**-ubiquity.icloud.com/ub/*********/rosync/********…