The heated pitot system consists of a heating element in the pitot tube. When the pitot heat switch is turned on, the element in the pitot tube is heated electrically to maintain proper operation in possible icing conditions. Ice blocking the Pitot tube will cause the airspeed indicator to malfunction. Pitot heat should be used when flying thru visible moisture(clouds or rain) with a outside temperature(OAT)or Total Air Temperature (TAT) of 0 degrees C or less. Commercial and jet aircraft use pitot heat continuously during flight.
Deice switch's control the wing and engine inlet anti-ice/deice system. Structural icing degrades performance of wings and engines. In large jet aircraft this consist of using hot engine bleed air to heat leading edges of wing and inlet of engines to prevent the accumulation of ice in flight. Normally used(simple answer) when flying in visible moisture with a OAT or TAT of 0 degrees or less. 🙂