Say there was a "one-for-ten" reverse split. For every ten shares you owned, you would now be left with one. Meanwhile, the share price is increased tenfold. If yesterday you owned 100 shares at $5 each, today you own 10 shares at $50 each. Your investment is still worth $500, so there's no gain or loss from your viewpoint. Generally, if this results in fractional shares owned, the resulting fraction is paid off with cash by the company, but sometimes you are given the option of buying the remainder of a full share. If cash is received, it counts as a sale and is taxed as a capital gain or loss.
A reverse split is usually implemented by cancelling the old shares and issuing new shares to shareholders of record on a specified date. If your shares are held in street name, your broker takes care of it and you receive statements. The reverse split is mandatory. Shareholders do not have the option to opt out.
A reverse split is usually, but not always, a sign that a company is in trouble. Companies who's share price has fallen so much that they will be delisted by an exchange will often do a reverse split to make the price per share high enough to avoid delisting.