Here are common uses for wire colors:
Blue or Black – C – Common wire, may be unused by your existing thermostat.
Red – R – 24VAC power from the furnace’s transformer.
Red – Rc – 24VAC (dedicated to heat call)
Red – Rc – 24VAC (dedicated to cooling call)
Green – G – Fan.
White – W – Heat.
Yellow – Y – Air conditioner.
Why is there a ground wire?
Electrical Grounding Made Simple. The ground wire is an additional path for electrical current to return safely to the ground without danger to anyone in the event of a short circuit. In that instant, the short would cause the current to flow through the ground wire, causing a fuse to blow or a circuit breaker to trip.