The point is it doesn't go to the internet, it just sets up an alias to your local machine.
This is useful when you want to have several different virtual hosts on your machine, all of which would otherwise be called "localhost".
It does go to the Internet, for the DNS query. This won't work offline.
Your browser asks the DNS server for the IP address corresponding to the domain name. If you ask for google.com it will reply e.g. 74.125.228.228 and then your browser will connect to 74.125.228.228 directly. When your browser asks that same DNS server for til.io's IP address, it gets 127.0.0.1, and then your browser connects to 127.0.0.1!