Chemiosmosis involves the generation of a proton gradient across a membrane and the subsequent production of ATP through ATP synthase. This process is primarily observed in the mitochondria during cellular respiration and in the chloroplasts during photosynthesis. The energy stored in the proton gradient is harnessed to drive ATP synthesis, which is vital for various cellular activities.