A diode is an electrionics component that will pass current in one direction but is resistant to current flow in the opposite direction. They are used to convert alternating current (AC) into Direct Current (DC) among other things. The alternator on cars produce alternating current and use diodes to convert it to DC to charge the battery.