This question and your other one indicate you're a bit unclear on how capital gains taxes work, so here's the deal: you buy an asset (like shares of stock or a mutual fund). You later sell it for more than you bought it for. You pay taxes on your profit: the difference between what you sold it for and what you bought it for. What matters is not the amount of money you "withdraw", but the prices at which assets are bought and sold.
In fact, often you will be able to choose which individual shares you sell, which means you have some control over the tax you pay. For a simple example, suppose you buy 10 shares of stock for $100 each in January (an investment of $1000); we'll call these the "early" shares. The stock goes up to $200 in July, and you buy 10 more shares (investing an additional $2000); we'll call these the "late" shares. Then the stock drops to $150. Suppose you want $1500 in cash, so you are going to sell 10 shares.
The 10 early shares you bought have increased in value, because you bought then for $100 but can now sell them for $150. The 10 late shares have decreased in value, because you bought them for $200 but can now only sell them for $150. If you choose to sell the early shares, you will have a capital gain of $500 ($1500 sale price minus $1000 purchase price), on which you may owe taxes. If you sell the late shares, you will have a capital loss of $500 ($1500 sale price minus $2000 purchase price is -$500), which you can potentially use to reduce your taxes. Or you could sell 5 of each and have no gain or loss (selling five early shares for $150 gives you a gain of $250, but selling five late shares for $150 gives you a loss of $250, and they cancel out).
The point of all this is to say that the tax is not determined by the amount of cash you get, but by the difference between the sale price and the price you purchased for (known as the "cost basis"), and this in turn depends on which specific assets you sell. It is not enough to know the total amount you invested and the total gain. You need to know the specific cost basis (i.e., original purchase price) of the specific shares you're selling. (This is also the answer to your question about long-term versus short-term gains. It doesn't matter how much money you make on the sale. What matters is how long you hold the asset before selling it.)
That said, many brokers will automatically sell your shares in a certain order unless you tell them otherwise (and some won't let you tell them otherwise). Often they will use the "first in, first out" rule, which means they will always sell the earliest-purchased shares first.
To finally get to your specific question about Betterment, they have a page here that says they use a different method. Essentially, they try to sell your shares in a way that minimizes taxes. They do this by first selling shares that have a loss, and only then selling shares that have a gain. This basically means that if you want to cash out $X, and it is possible to do it in a way that incurs no tax liability, they will do that.
What gets me very confused is if I continue to invest random amounts of money each month using Betterment, then I need to withdraw some cash, what are the tax implications.
As my long answer above should indicate, there is no simple answer to this. The answer is "it depends". It depends on exactly when you bought the shares, exactly how much you paid for them, exactly when and how much the price rose or fell, and exactly how much you sell them for. Betterment is more or less saying "Don't worry about any of this, trust us, we will handle everything so that your tax is minimized."
A final note: if you really do want to track the details of your cost basis, Betterment may not be for you, because it is an automated platform that may do a lot of individual trades that a human wouldn't do, and that can make tracking the cost basis yourself very difficult. Almost the whole point of something like Betterment is that you are supposed to give them your money and forget about these details.