The first mechanism allows the penguin to control the rate of blood flowing to its feet by varying the diameter of arterial vessels supplying the blood. In cold conditions the flow is reduced, when it is warm the flow increases. Humans also can do this too, which is why our hands and feet become white when we are cold and pink when warm.
The second mechanism takes the form of counter current heat exchangers at the top of the legs. Generally in penguins, the warm blood entering tails, flippers or feet flows past cold blood returning to the rest of the body. This is called counter-current heat exchange. This arrangement warms the cold blood entering the rest of the body, and cools the blood entering the tail, flipper or foot. It reduces the overall loss of heat from the body. The arteries, which supply warm blood and oxygen to the penguin's feet break up into many small vessels which are closely linked to similar numbers of venous vessels bringing cold blood back from the feet. So, when heat is lost from the arterial vessels, the venous vessels running in the opposite direction pick it up and carry it back through the body, rather than out through the feet. This means that in the very remote regions of the skin, cells get oxygen but heat isn't lost through the skin.
At low temperatures or when in the sea, the blood flow to feet is very low anyway and are held a degree or two above freezing so that the temperature difference between feet and the surface is minimum. Hence there is a minimum heat loss due to conduction avoiding frostbite. When it gets too cold, the feet are covered by the plumage and fat layer of the body so they are not exposed to cooling winds. When the penguin needs to lose heat quickly, the blood flow to these extremities is increased. So lots of warm blood enters them which cools quickly. Thus excess heat is dumped rapidly and efficiently.