An electron-hole pair forms when an electron in a semiconductor gains enough energy to jump from the valence band to the conduction band, leaving behind a vacancy or "hole" in the valence band. This process is fundamental in semiconductor physics and has significant implications in the field of nanotechnology.