A single photon in the double slit experiment will actually only hit one detector. The sense in which it "passes through both slits at once" is more subtle.
If you perform the double slit experiment with a light beam composed of many photons, the electromagnetic waves passing through each slit create peaks and troughs in both the electric and magnetic fields as they oscillate in space and time. When the light beam splits and passes through slit A and slit B, the combined wave's amplitude is greater where the peaks of the slit A wave line up with the peaks of the slit B wave and likewise with the troughs (called "constructive interference"), and smaller where the peaks the slit A wave line up with the troughs of the slit B wave and vice versa (called "destructive interference"). You see this on the detector as a pattern of alternating high and low amplitude detections, an interference pattern.
If you send one photon at a time through, you'll detect each photon in only one place on the detector, always with an energy hf where h is <PERSON>'s constant and f is the frequency of the light. 795
But what's amazing is that if you repeat this experiment many many times, you see that detectors where you'd expect high amplitude in the beam case detect the photon more often, and detectors where you'd expect low amplitude detect the photon less often. The photon, we reason, must have somehow smeared its position throughout space and passed through both slits in order to interfere with itself, but then just as it reached the detector decided on one and only one position, with the probability of it "snapping" to a particular position being proportional to the square of the amplitude of the smeared-out light wave.
Why does it do this? This was mysterious when photons were first studied in the early 20th century, and it's still mysterious to us now. We've named this mystery "the interpretation of quantum mechanics", and explanations range from physical properties not having a definite value until some consciousness observes them to the existence of infinitely many parallel universes in which all possible outcomes are observed. But all interpretations agree that you can't use this as a way of getting free energy. 795