When p-type and n-type semiconductors are joined, electrons from the n-side fill holes on the p-side, creating a depletion region — an invisible wall that controls current flow. This is the fundamental principle behind every diode, LED, solar cell, and transistor in your smartphone!