As you start to read more source code, you'll get better at this; you'll find what works for you.
In the meantime, there are a few strategies:
- Pick a feature you like, and try to find the source that implements it
- Find the beginning point in the source and step through it, try to understand how it sets itself up
- Start poking around aimlessly until you find something that makes you curious (i.e. that's an interesting technique, why have they done that? etc)
One thing that helps me is to put myself in the author's shoes. Why did they do things this way? Was it good/bad? For me, reading source code is about learning new strategies for solving problems. I usually look at a project and think how I would have done it, then I see how they do it and compare.
Specifically for Sinatra, if it were me, I'd setup the most basic Sinatra web app, and then try to figure out how the "get" method sets up a listener. Trace it back to it's Rack roots (Rack is the webserver it uses). You might end up learning a little bit about Rack applications.
You don't have to understand everything you see, but like in the above example, you'll want to get some kind of bearing of what's going on. Then ask more questions and try to find the answers.