Noobish question. I'm trying to make a dc variable voltage power supply. I will include the schematic which I am trying to build. In the schematic there are two 1000 uf capacitors which I believe are used to smooth out the peaks of the dc voltage before hitting the regulator, but I am confused because in the schematic it shows them being grounded. Wouldn't the capacitor drain without going through the circuit then? Thank you for reading, hopefully I can figure out why.
Notice that the capacitor symbol shows a gap between two plates. That's literally what a capacitor is. A capacitor doesn't allow current to flow through it. It only allows current to cause a charge buildup on it. You're converting excess voltage and current into an electric field between those two plates. Then when you need a little extra voltage/current the electric field converts some of the energy back into voltage/current. At no time is any significant amount of current supposed to pass through.
In your schematic, you can think of the white plate of the capacitors as holding excess energy and then pushing that energy back up and into the In terminal of your regulator when the voltage of the fullwave rectifier droops.
The reason the other side is connected to ground is because in order to convert the voltage/current into the electric field, you have to remove positive charge from the negative side of the capacitors as you're adding positive charge to to the positive side of the cap. Without the connection to ground, there would be nowhere for that charge to go and the capacitor would be virtually useless.
EDIT to address question in comment:
Capacitors connected to the next component down the line have an entirely different purpose than decoupling capacitors you ask about in your question. Because charge can never flow through caps, a capacitor setup in that topology can have a little bit of charge pushed onto the cap before the plates saturate with charge. Once they saturate (or before), you can go ahead and pull that charge off by lowering the voltage. Then you keep switching it back and forth to prevent the capacitor from ever saturating. In this way, although no electrons actually cross the gap, you're able to put charge onto the cap on one side (while drawing it off on the other) and then performing the reverse of this. This means that you're passing through alternating current but you're prevented from passing direct current. The key here is that in order to put charge onto one side of the capacitor, you have to remove an equal amount from the other side. This removal of charge from the other side is what allows you to still get work done even though there's no physical connection through the gap.
All grounds of the same type and node name are connected together in the circuit, which means that the other side of the capacitors (and usually the load) connect to the negative side of the bridge. Also, note that electricity, or is this case more correctly charge, doesn't drain away to nowhere; it may sound tautological, but you don't have a circuit unless you have a circuit, and electricity only (for the most part) flows if you have a circuit.
(Note, however, that not all symbols that are "earth ground" actually connect to earth. Yeah, it sucks, but oh well.)
but I am confused because in the schematic it shows them being grounded.
Unfortunately, your confusion is a common one and the root is a poor choice of words. The word "ground" is often used instead of, for example: "return", "common", "reference", etc.
Essentially, the symbol we call "ground", in most cases, simply denotes the circuit node we assign the voltage of zero to - it's where we put the black lead of our voltmeter when we want to measure a node voltage.
When, as in your circuit, you see several places the ground symbol is used, you assume that all those points are electrically connected, i.e., they are the same circuit node.
From the Wikipedia article "Ground (electricity)"
In electrical engineering, ground or earth can refer to the reference point in an electrical circuit from which voltages are measured, a common return path for electric current, or a direct physical connection to the Earth.
When used as a reference point in an electric circuit, there's nothing particularly special about that node and it certainly doesn't mean there's a connection to a sink for electric charge.
But, even if that node were connected to such a sink, it doesn't follow that charge would drain from the capacitor. The reason is this: in a circuit context, charged capacitors are electrically neutral.
This is because the current into one terminal of a capacitor must equal the current out of the other terminal thus, no net electric charge accumulates in the capacitor.
Instead, one can think of electric charge being 'pumped' from one plate of the capacitor to the other. We often say that charge is separated in a charged capacitor. For example:
When a capacitor is being charged, negative charge is removed from one side of the capacitor and placed onto the other, leaving one side with a negative charge (-q) and the other side with a positive charge (+q). The net charge of the capacitor as a whole remains equal to zero.
Given that the separated charge is in very close proximity (the plates of the capacitor are very close together) and, due to the electrostatic attraction between positive and negative charge, the charge 'wants' to get closer together, not separate further.