To protect pipelines and other metal structures from corrosion, the oil and gas industry uses cathodic protection (CP). The science of CP is based on electrochemistry. It is complex, but in short, CP suppresses unwanted corrosion reactions by applying a protective electrical current. CP provides an effective method of mitigating the corrosion damage to metal surfaces exposed to a conducting (corrosive) electrolyte. This chapter provides the design requirements for electrochemical corrosion and CP as well as the electrochemical methods of preventing corrosion that consist of cathodic and anodic protection.