A margin account lets you borrow money from your broker to buy more stock than you have cash for. If you have $10,000 in cash, a 2:1 margin account lets you control $20,000 worth of stock.
Margin amplifies both gains and losses. A 10% gain on $20,000 is $2,000, but you only put in $10,000, so your return is 20%. But a 10% loss is still $2,000, which is 20% of your actual capital.
If your account value drops below a certain level (the maintenance margin), your broker issues a margin call. You must add funds or your positions are liquidated, often at the worst possible time.
Margin accounts are required for short selling and for day trading under the PDT rule. They come with interest charges on the borrowed amount.
Cash accounts do not allow borrowing. You can only buy with cash you actually have. The PDT rule does not apply to cash accounts, but you can only trade with settled funds, which takes one business day.