It is not possible to connect a capacitor to a battery, because with a perfect battery and perfect capacitor an infinite current will flow and the universe will be destroyed.
spec
Of course, this is not at all true in the Real World: Only in the theoretical world can we lay claim to perfect batteries, capacitors, inductors, wires, etc.
In order to understand how the math models the action of the active and passive components, it really helps to understand the real basic tenets of electricity and electronics:
1) There are no ideal components: Wires have resistance, batteries and capacitors have leakage currents, inductors' effects are weakened by eddy currents (induced into any nearby metal including their own windings) and even at initial conditions (i.e., immediately upon connection of voltage across an inductor) have resistance which limits currents from becoming infinite.
2) Only when you simplify equations to make calculations easier, do you run into impossible situations, which are dissolved by adding back the things removed to make things simpler.
An example: A battery connected to a capacitor.
If we are working in a simplified 'ideal' system, we presume that the voltage which is marked on the battery is delivered to the terminals of the capacitor, which immediately begins to draw infinite current. There is _nothing wrong with this_, because we've already discounted that any heat/work is created by ignoring lead resistance, and by the same simplification, we've ignored the capacity of the plates (which would fill instantly without resistance.) Which is also OK, because then we can add an in-line resistance in the form of a perfect, ideal resistance, whose value is exactly what we say it is in ohms, and which doesn't have _any_ capacitive or inductive characteristic.
In the lab, even if you connect a battery to a capacitor, reality keeps you from destroying the universe. The resistance of the wires, small though it may be, prevents infinite current. The internal resistance of the battery also prevents infinite current. That alone is sufficient to cause a rise-time in the charge of the capacitor. If the capacitor value (Farads) is gigantic, a great big current will be drawn, and the internal resistance of the battery will drop nearly all of the voltage generated by the battery, causing the voltage differential between the battery terminals to drop to a very very small value. As the capacitor charges, the capacitor's voltage rises, and the current that flows is reduced as the capacitor charges. As the current decreases, the battery's internal resistance also sees less current and the voltage dropped inside the battery decreases, and the voltage at the terminals is able to rise. It is a complicated dance, which only matches reality when the mathematical model takes into account every single _real_ characteristic of the components.
So, to make it easier to learn, we reduce the variables we pay attention to, and we don't design laser ray guns to shoot down ICBMs... because we know we've simplified to allow learning. When we've learned more, we add more variables and pay attention to more physical characteristics. When we've learned a whole lot, the aspects we are ignoring have such small effects that we can once again ignore them without too much worry... as long as their values aren't large in comparison to the electrical characteristics of the circuit.
And here's an example of that: When we play with semiconductors like diodes and bipolar transistors, resistances under 1Mohm are fairly common. A 100V supply which is connected across a 1Mohm resistor draws only 1ma of current, which 'isn't all that much'. 2-3Amps can make problems (and lots of heat.) In transistors, you control a large current with a small one: it's magic! Except if your small current is too large, the large current is gigantic, and the real-world heat buildup can damage the transistor. What if we had a transistor with a control element that didn't draw current? Enter the IGFET: instead of controlling current with current, you control current with a voltage, and current through the control terminal is very very small (pico-amps and smaller). So that's even more wonderful! Except...
Except the insulated gate is very thin. And that means the voltage which causes breakdown is very high. That's not all that bad, though, because there aren't too many sources of pesky megavolt sources, right? Wrong. Static electricity can build up gigantic voltages, and when the breakdown potential is exceeded, the current through the insulation gate is enough to destroy it. This is why ESD (Electrostatic Discharge) is such a worry in the microelectronics field.
So we don't sweat impossibilities created by oversimplifying the model and then smacking it with real-world problems. We start simple, learn the fundamental relations and explore the fundamental equations, and if we really want to succeed, we experiment. Learn to solder. Learn to operate an oscilloscope. Learn to fix TVs or Radios or (heavens forfend) pocket calculators. And keep track of what you learn.