I understand that the rails s command starts a server and you can access your Rails application because of this command.
However, don't you usually have to connect to some other server outside of one's computer?
Why that? A server is just a "computer" and it can be your one. One difference is that you make HTTP request in your local network (from the browser to the server on your machine). While in a request to a real server the request also starts from your browser but reach a server elsewhere.