Below is an excerpt from a physics textbook:
One common way to charge a capacitor is to connect these two wires to opposite terminals of a battery. Once the charges $Q$ and $-Q$ are established on the conductors, the battery is disconnected. This gives a fixed potential difference $V_{ab}$ between the conductors (that is, the potential of the positively charged conductor $a$ with respect to the negatively charged conductor $b$) that is just equal to the voltage of the battery.
Why does the potential difference between the conductors equal the voltage of the battery when the battery is disconnected? Could someone please provide a detailed explanation? Thanks in advance.