What purpose does the bare wire in a 12-3 gauge cable serve?
The ground wire will not have any extra insulation, though it is usally wrapped in paper to seperate it from the other conductors.
12-3 NM (aka "Romex") cable will have a bare grounding wire, white neutral (grounded) wire, black hot (ungrounded) wire, and red hot (ungrounded) wire.
If you only see white, black and bare wire then it is actually 12-2 (the second number is the number of conductors, the ground wire is not included in this).
12-3 NM Cable
The bare wire is the ground wire.
The red and black wires are typically used for the 'hot' phases of split 240VAC center tapped supply (the standard residential power in North America).
The white wire is typically neutral (the centertap of the split 240).
Other configurations are possible, three way lighting circuits or supplying several devices clustered together (E.G. bath fan and light independently switched).
The bare, green, or yellow/green wire is exclusively reserved for Equipment Safety Ground, aka the Equipment Grounding Conductor. Grounding is strictly a safety shield to reduce chance of electric shock, and to encourage other problems to trip a breaker instead of start a fire.
In cable meant to be installed in walls, the ground wire is not counted. So a black-white-bare cable is a 12-2 cable. A 12-3 cable is special, it also has a red wire.
In cordage, or flexible cable meant to go to appliances or extension cords - this is the cable you handle all the time - the ground wire is counted as one of the wires. Black-white-green is called a 12-3 cable.