I've always wondered how this works. When google crawls, it clicks all the links on the site, then start crawling from the links? or how does it work?
You say google clicks all the links on your site, that's true, but that's already a few steps after the starting of the process. First of all google needs to find your site. This can be via another link on an external website which google already knows, or by submitting your site to google itself (not recommended). When google knows your site, it will look to your robots.txt. The crawler can read there what to index, and what not. After that google is going to follow all your links (not the first time), and index them. Don't think your whole site will be indexed in one time, this can take some time. You can help (and maybe speed up) the process by uploading a sitemap to google at https://www.google.com/webmasters/tools/