They just save a cookie on your computer and use it to identify you. Delete the cookie and they'll have no record of you.
Nope. It is not through cookies. All my cookies are automatically deleted on exit. Not cookies.
Like Teamviewer, they compute a "signature" of the computer and the only way to change that is to change the physical configuration.
In Teamviewer I can reinstall the OS and TeamViewer and still be assigned the same ID. Change the physical configuration and the ID changes.
I once read an interesting page explaining how this is done but cannot find it now. It can be done by a combination of hardware identification and software. Create a signature that is based on a combination of say, browser used, add-ons, configuration, other software like codecs, etc, hardware, .... heck just the network card's MAC address is unique if the software can get it. There are many ways to get a unique signature for a computer.
Youtube definitely does not use cookies to identify me because no matter what, they are deleted every time I exit. And some sites will say "enable cookies".