When a voltage is connected to a capacitor it charges up. It's a bit like charging the battery in your mobile phone. In fact the mobile phone battery can be considered to be a very large capacitor.
See the below animation.
|Charging a Capacitor|
|Charging a Capacitor- Characteristics|