They use domain names.
You'd need to buy a domain, and point it to your IP address. You could also use a free domain from dot.tk.
I don't recommend using your home/private internet connection to host a server, unless it's only for friends, and so set not to be shown on the servers list.
That's because it will expose your public IP address to everyone (even if you use a custom domain), and therefore more or less what town you live in.
You could also rent a.. virtual private server(?), a virtual server running on a real server, running Windows Server or some kind of Linux, and host your RoR server from there, and that will keep it running 24/7. Otherwise your home computer would have to be on 24/7.
Edit: there's also this...