A Cessna 172 has no anti icing system, as long as i remember a electrical pitot heater for preventing freezing over the pitot tube and a carb heater for preventing formation of ice in carburetor are the only two ways to prevent ice from forming; for that the C172 cannot flight in cold weather conditions.
There are two common types of anti ice systems: the electric thermal heating system and the bleed air (pneumatic) system.
The electric thermal heating system are most commonly used on windshields and propellers. The bleed air anti ice systems is used by most jet aircraft to prevent ice from accumulating in leading edges and flight surfaces (this air is taken from the engines or an independent compressor unit).
Firstly, the ice formation is always on the leading edge of the wing. Sometimes the wings are provided with some material underneath the first layer at the leading edge. This material is made hot and this will melt the ice from the wing.
Secondly, sometimes the leading edge of the wings are made in such a way that there are few strips on the leading edge of the wing can move up and down thus breaking that hard layer of the ice from the wing. These are few and effective ways which are being employed, besides there are many other ways of doing the same.
Just as Eduardo Xocoy Alvarez has explained in detail, for piston engine aircrafts like Cessna 172 the anti-icing system uses electric thermal heating systems.
It is also necessary to understand that the "anti-icing" systems are different from "de-icing" systems. Simply put anti-icing is used almost in every life size aircraft in the carburetors and pitot tubes as both work on the venturi principle and can form ice even in conditions considered normal. While de-icing systems are used on the leading edges of the propellers and the wings in aircrafts rated to fly in cold conditions. A regular Cessna 172 is not rated for such conditions.