Short Precise Tested Answer:
TeamViewer 10 installs with a random 6 digit password, which is reset each time:
-- TeamViewer or the PC is restarted
-- The user resets the random password by hitting the spinner, just to the left of the password, (hover to see the spinner).
Long Answer: (This presumes the intent was to Repeatedly and Reliably reconnect).
TeamViewer's Main UI shows an ID and only a 6 character TEMPORARY password by default. Every time you log into that PC using that PW, it is NOT changed automatically, by default and design, but instead when the application is restarted for any reason.
You must set an "UN-ATTENDED PASSWORD", also called a "Personal Password", which doesn't change, and should also be reasonably complex. Whoever has this password, has complete access to your PC, by definition.
To set this password, simply go to the Main UI, under "EXTRAS"...., "Security"...., and add your password. Don't click on "Grant Easy Access", unless you understand it.
So you won't have to remember separate passwords for each PC, I'd strongly suggest you create a login account from their website. With this one username, you can then log into any PC you "assigned" to that username, without typing that PC's remote access password.
-- AFTER you have created an account username, on each PC, set a different password for each PC.
-- Go to "EXTRAS", "GENERAL", and then "ASSIGN that PC [device] to your new username". Then simply log in as that user on each machine, which is set to autostart with Windows. To the right of that UI, you'll see a list of all the PCs you own, have in your contacts, or have been given access to.
NOTE: Unless that PC is on and logged in, you will NOT see that PC in the list to the right of the UI. To correct this oversight and see all your PCs if are logged in or not"
-- Go to "EXTRAS", "Computers and Contacts", and UN-Check: "Offline Computers in a Separate Group". Personally I hate it when items appear or disappear from any list, and so now they won't. You can also group your PCs accordingly.