A base is an area of operation for a mining minerals and vespene gas. Its main starting building is a command center for terrans, a nexus for protoss or a hatchery for zerg. The main building is required for producing workers, which are needed to construct new buildings and to harvest the minerals and vespene gas. The main base usually has many other buildings, unless the base is just starting out.
Basic strategy of StarCraft and StarCraft II involves defending your own bases and destroying all enemy bases. Bases are also where all unit and building construction take place, as well as all research into upgrades and new abilities.
Terrans can build their buildings anywhere and also lift off many types of buildings for even more mobility, while zerg have to build all buildings other than hatcheries and extractors on creep, and protoss have to build all buildings other than nexuses and assimilators near pylons. Terrans and protoss have separate buildings for unit production, while zerg produce all units from the larvae around their hatcheries, lairs, or hives.
In most games, destroying all enemy bases achieves victory, although some games have other victory conditions instead. Therefore, it is essential to have good base defenses for both land and air attackers, including detectors to spot cloaked attackers. Base defenses can consist of units, defensive structures, or ideally both. In order to destroy an enemy base, it is best to find the weakness of that base (such as no air defenses or no detectors) and then exploit that weakness before the opponent can fix it. There are a wide variety of strategies players use to destroy enemy bases while defending one's own bases, the simplest one being a rush. Some missions do not involve bases at all, and these typically take place in installations.