The electron transport chain occurs in the inner mitochondrial membrane in eukaryotic cells, where its components are embedded to facilitate electron transfer and proton pumping. In prokaryotes, which lack mitochondria, the chain takes place in the plasma membrane. This localization allows the generation of a proton gradient, which is necessary for ATP synthesis.