Let's start off by saying that you don't need to fully understand the technical details of how DCC works to make DCC work.
There is polarity, which can be handled by auto reversers so you don't need to flip switches.
There is a digital signal on the power lines, which is sent from the command station to the train.
There is full power on the track at all times while the system is turned on. Voltage is not varied to control loco speed.
The polarity of the DC power on the rail does NOT control the direction of the locomotive.
Note: it is two mirror image waves. The track is not simply DC, but bipolar (AKA modulated) DC with an imposed digital signal.
It's not actually AC. An AC signal would range from +12v to -12v on the same rail. The DCC signal ranges from +12v to 0v on one rail, and -12v to 0 volts on the other.
The power can be broken up:
DC power to power the motors/lights/sound/animation.
Digital signal on top of the DC power to tell decoders what to do.
The DCC wave form is created by a DCC controller (command station). It is sent to a booster (or a couple of boosters) where the DCC output is added to the DCC Commands. That is sent from the booster to the rails. The DCC decoder in the loco picks up the signals from the rails, converts the signals and applies the DC to the DC motors in the train.
Wireless DCC controllers have an RF transmitter in the hand (throttle), and an RF receiver that controls the DCC controller (command station). But the DCC Signal and power still goes through the booster and the rails.
With DCC, you put a 'fixed' electrical power on the track. This means that all locomotives have power to their wheels all the time. Instead of the power controlling the trains, a receiver (decoder) inside each locomotive listens to commands sent out over the rails from the command station. These commands tell the decoder to make the train for go forward, reverse, fast, slow, or turn on/off lights or sounds.
With this setup, you control the trains and not (like with DC) the track. Because of this, and the whole point of DCC as a whole, it is possible to control multiple trains on the same track without having to deal with complex wiring to isolate each section of track to control each train.
You need to be aware that, since all locomotive power comes from the track and more than one locomotive may be running at once, DCC boosters (and their power supplies) are designed to have current ratings of 5 to 10 amps. Because DCC locos and their ampere demand may be located anywhere on the layout, wiring to the track for DCC needs to be designed to handle a higher number of amps.
For all locomotives to run properly, you need to be sure that there are no voltage sags. That is, you need to be sure that all sections of track have sufficient power to handle the locomotives. The best way to do this is to scatter feeder wire connections around the layout. A second reason for a robust wiring system is to ensure that the over current protective devices built into the DCC booster will operate correctly. This is necessary to protect your railroad equipment from damage caused by an accidental electrical problem, such as derailments.
With DCC, a booster can supply 12 volts (or as high as 18 volts for larger scales) at 5, 8 or even 10 amps into a track short-circuit without becoming overloaded. Such a short-circuit represents perhaps 60+ continuous watts. This current can quickly melt trucks, engines, or let the magic smoke out of decoders. To help prevent this, DCC systems have short-circuit protection built into the booster. When a short-circuit is detected, the booster will shut down. Once the short-circuit has been removed from the track, the booster will automatically turn the power back on.
For this to work, any point on the track needs to wired so that the full load of the booster can pass through it so that the booster's protection can function properly. To test this, simply place a metal coin, or some other metal object, across the rails. The booster should shut off the power automatically, and turn the power back on once the object has been removed. This usually means that heavier, larger wire, better track connections, and more track feeders are needed as compared to a traditional DC-powered electrical circuit.
DCC Analog and DCC