They're add-ons. An expansion installs on top of the base game and extends it rather than replacing it.
Diablo II is the standard illustration. The original ships with four acts; the expansion adds a fifth, and when you install it your existing character carries over — stats, items and spells all intact. You then launch from the expansion's disc, or from a full install if you've copied everything to the drive.
Other expansions add content types rather than story. RollerCoaster Tycoon expansions introduce new ride categories, for instance. Some titles, especially open-ended MMOs like EverQuest, release expansions constantly, so storage adds up — a large hard drive is worth having if you install everything locally.
They're also usually cheaper than a full release, which is the main reason people buy them.