The process is effortless and intuitive. When you find a document you want to attach to someone you've already recorded in a family tree, simply click the "Save to Ancestry" button and follow the instructions.
There's the big green "Save to Ancestry" button above the image, over to the right. I clicked on it, and a popup window opened showing my Ancestry.com user name. I selected one of my trees, which contains Martin Carringer, from the dropdown list, and started typing the name: