The basic thought is that you want to sweat as little as possible and stay dry as much as possible. To generate this your clothing must transport moisture away from the skin, hold dry warm air close to the body and keep rain and snow out. The three-layer-system enables you to regulate your body temperature yourself by taking off or putting on garments as changing weather or intensity of work demand.
How it works from inside out:
Layer 1 clothing keeps you both warm in the cold, cool in the heat and dry all year around. It transports moisture away from the skin and distributes it on the outside of the garment, where it either evaporates or is passed on to the next layer.
Layer 2 clothing helps you retain heat by trapping air close to your body. It provides insulation and warmth while transporting moisture and excess heat to the next layer or into the surrounding air.
Layer 3 clothing protects you from wind, rain and cold. At the same time it allows surplus heat and moisture from the layers underneath to continue its way from the body into the outside world.