First of all, you can think of this integral using almost the same picture. The only difference is that instead of summing just the areas of the rectangles, you first multiply each area by $g(x_{i+1})-g(x_i)$ and then add.
The idea is that we no longer consider the real line as having the same "weight" everywhere; some parts are now "more important" than others. When we did usual integration, we assigned the the piece of the line between $x_i$ and $x_{i+1}$ the weight $x_{i+1}-x_i$, exactly proportional to its length. Now, instead, this same piece is given weight $g(x_{i+1})-g(x_i)$.
In particular, if we picked g so that $g(x)=x$ for all x, we would get the regular integral back. If g were constant, all integrals would become zero; no part of the real line would matter at all.
Final amusing example if g(x)=0 for $x \leq 0$ and g(x)=1 for $x > 0$, then no part of the line matters except the origin. For simplicity, suppose some $x_i=0$. Then, our Riemann-Stjeltes sum will be:
$$\sum_{i=-n}^n f(x_i)\cdot \underbrace{(g(x_{i+1})-g(x_i))}_{\text{not 0 only if }x_i=0} = f(0)$$no matter what our step is. So, the integral of any function f will be f(0). (The function will need to be continuous for integrals to be well-defined, as always)
But, I think what you are really missing is the concept of a measure, at least an intuitive one. It takes a bit of work to learn, but makes understanding all kinds of integration much easier. My favorite source for this is the dirt-cheap book by Kolmogorov-Fomin (you'd need to look at the last couple of chapters, and to reference the first chapters episodically), but it would certainly require some time and might be more than you need. Ideally, just take a graduate-level (or similar) analysis course.