The side of the diode that is connected to the p-type semiconductor is known as the anode. The anode is the negative side of any electrical device, on a diode this side is usually marked by a white line. The complete opposite can be said for the side of the diode connected to the n-type semiconductor which is known as the cathode. The cathode is the positive side of any electrical device.
Depending on the voltages of the two semiconductor regions the junction between the two semiconductors can become depleted of charge carriers. Once the carriers are depleted the semiconductor will no longer conduct electricity. This property is described as either forward bias and reverse bias. Bias in a semiconductor is the applied voltage to the p–n junction. When no current is passing through the diode the electrons in the p-n junction return to a state of equilibrium. That means that that all of the electrons return to the p-type side of the junction and all of the holes return to the n-type side. Holes are the conceptual and mathematical opposite of an electron.
Forward bias is when the positive side of the power source is connected to the anode and the negative side of the power source is connected to the cathode. The flow of current through the diode causes the p-type side to repel the holes and the n-type side to repel the electrons. This pushes the holes and the electrons close together in the center of the junction. As the holes and the electrons get closer together the electrical resistance of the n-p junction decreases thus allowing current to flow through the diode.
Reverse bias is when the negative side of the power source is connected to the cathode and the negative side of the power source is connected to the anode. The flow of current through the diode with this polarity causes the p-type side to attract the holes and the n-type side to attract the electrons. This pulls the holes and the electrons to opposite sides which depletes junction. When the junction is depleted no current can pass through.