That is exactly how it works.
All of the Desktop and Documents on the first Mac will be moved from ~/Desktop and ~/Documents to a hidden folder (something like ~/Library/Mobile Documents/), place a new finder Sidebar link to these "hidden" directories and files, and upload everything to iCloud. Then, when you activate it on the second Mac, it will do the same, including downloading anything from iCloud that you don't have on the second Mac. Eventually, the two will have identical directories and files in these locations, with a copy on iCloud.com as well.
Two tips. let the first one complete its sync before you activate it on the second. Basically, check the web folders to see if they seem to reflect the stuff on your first Mac. Maybe even let it run overnight to be sure. Then, when you activate on the second one, it will upload and download until everything is in sync. The process can take time, I recently did this for a Mac I restored from backup (new SSD) and it took an hour or two for downloads to complete.