Rebalancing is maintenance for an asset allocation. Markets move unevenly, so a portfolio set at 70% stocks and 30% bonds drifts. After a strong year for stocks it might sit at 76/24; after a bad one, 64/36. Rebalancing sells some of whatever grew and buys whatever lagged, restoring the original mix.
The effect is to force the discipline that is hardest to keep by hand: selling high and buying low. It also keeps risk where you set it. A portfolio that has drifted to 85% stocks will fall much harder in a downturn than the 70% portfolio you planned for.
Example: a $200,000 portfolio at 70/30 grows to $240,000 after stocks rise 25% and bonds rise 2%. It is now $175,000 stocks and $61,200 bonds, about 74/26. Rebalancing to 70/30 means selling about $9,800 of stocks and buying that much in bonds.
How often is a matter of preference. Once a year is common. Another approach is to rebalance only when an asset drifts more than five percentage points from target. In taxable accounts, selling triggers capital gains, so many people rebalance with new contributions instead, directing fresh money toward whatever is underweight. Inside a 401(k) or IRA there is no tax cost.
The common mistake is rebalancing too often, which racks up transactions and taxes for little benefit, or never rebalancing at all, which is how a moderate portfolio quietly becomes an aggressive one.