It's actually really simple, despite how they make it appear!
Compound interest means nothing more than the fact that the interest of each month is calculated based on the outstanding balance at that month, rather than at the beginning. So if you start with a principal of P, at an interest rate of x (phrased as a plain number, not a percent -- 3% is x=0.03), the amount grows to P(1+x) after one month. The "1" is from the original amount and the "+x" accounts for the additional amount due to the interest from previous months. It becomes P(1+x)² after 2 months, P(1+x)³, and in general, after n months it is P(1+x)ⁿ. Of course, we typically quote the interest rate as a yearly figure, but compound more often than that. In that case, we just have to compute the interest per compounding period. If we compound C times per year, it's simply P(1+x/C)ⁿ.
This is a geometric series. Using the letters wikipedia uses, the initial value, a, is equal to P, and the ratio, r, is equal to (1+x/C). With that information in hand, we can use the equation for the sum of a geometric series to compute all of the values needed.
There is also "continuously compounded" interest. In this case, we ask the question "what if C just gets larger and larger, compounding faster and faster?" It turns out that that doesn't make the outstanding balances baloon without bound. It actually approaches a finite value (which I think is kind of cool).
In practice we use tables like this because there's a lot of room for error when using the equations. Fat-fingering is pretty easy. We also often leverage Excel's functions for calculating these things.