The internet is just "client sends an HTTP request to the server, which sends back an HTTP response" where client is usually web browser. Sending an HTTP request is like writing to a file that goes across the internet, and reading from a file that came from the internet. So to understand the web, the most important thing is to understand HTTP requests. Then, you can go to Sinatra, and it will be "this is how Sinatra does that underlying thing you already know".
To see the request, go to the terminal and type nc -l 3000
(the number is called a port, it's like an index in an array, you put a program there, then when a web request comes in, it checks the port, finds the program, and hands it the incoming request). The specific number isn't important, as long as its big enough to get past the claimed ones. Now that you have that running, set it on one side of your screen, and set your browser on the other side. Then type `http:/