Bases can be captured by bringing units into their capture radius, which appears as a blue circle around the main building and staying there until it comes under your control (as indicated by the yellow bar over the base). There are a few other structures that can be captured and controlled such as Spotlights as well as Supply Caches, which are removed from the Battlefield once captured.
Conversely, Bugs can overrun your base and uncapture it in the exact same manner. Bugs that stay within the capture radius of a controlled base will rapidly cause you to lose control of the base, indicated by a yellow bar that decreases over time. Even if a base is overrun, it can be
recaptured in the future unless your primary objective was to defend it. If that happens, you will have to reload and try again.