Yes, re-balancing is a simple way to lock in on gains and the key part of that is owning many different assets that don't correlate with each other (or at least don't correlate very much). The premise is that you own broad-based index funds and, overall, markets will go up over time. If you own 50/50 stock/bond and the stock market tanks 50% with no effect on bonds, you now have 33/66 stock/bond. You sell bonds and buy stocks to get back to 50/50. You just bought stocks at a low price, assuming that the stock market will eventually recover. If you stick to this strategy it keeps you from bailing out of markets when they are (hopefully temporarily) low. It also keeps you from being too greedy when a large bull market is going on.
You could do the same with individual stocks and bonds; there's just more risk since an individual stock/bond could be on its way to losing all its value due to bad accounting or losing its competitive edge. With broad index funds you are mitigating the risk of individual company failure and relying on the stock/bond market to recover after it dips, which if it doesn't, we have a lot more problems on our hands.
The key is non-correlating assets. If all your assets went up/down the same way it would be pointless to rebalance because your percentages wouldn't change. Stocks and bonds typically go opposite ways, which is why they are used together a lot. Some people use international stocks and REITs since they don't correlate 100% with the US stock market. Some may use gold/silver too.