What actually happens when we take a long exposure image of a deep sky object like a nebula?
The short answer is we capture light, like any other kind of photography. That's what the sensors in our cameras are designed to do. During long exposure imaging of a nearby nebula, my astro camera is detecting millions of photons, individual particles of light, released thousands of lightyears away when the intense radiation from a star ionized the surrounding interstellar medium, mostly clouds of hydrogen. You often see these referred to as HII (H2) regions, which are massive clouds of ionized hydrogen. Our cameras detect the individual particles of light emitted by hydrogen atoms—that's deep sky astrophotography right there, in one line. What's happening at a detail level is a hydrogen atom, bathed in intense UV radiation from a star, loses an electron and becomes positively charged, which isn't stable. It then releases a photon (light) when it gains an electron and returns to a neutral state. This is the ionization process—continuous energetic state changes across clouds of hydrogen that span trillions of cubic kilometers, and this process goes on for billions of years. It's all photons, particles of light without mass, continuously shooting off in all directions, generated when hydrogen atoms return to their stable state. And some tiny fraction of those photons arrive at our little planet, go through the atmosphere above New Hampshire, through the telescope I have focused on a point in the sky to hit one of the millions of photo sites on the camera sensor (my monochrome camera has a 16 megapixel sensor—11.7 million pixels). So, if I say I'm shooting a four-minute exposure, it means the "shutter" is open for 240 seconds, capturing photons the whole time, and the number of photons striking each site or "pixel" is converted into a value that, when read out, represents the light and dark values and gradients in an image.
Meanwhile the earth is rotating rapidly, a degree every four minutes, and if I want the stars to look like stars and not streaks of light, I need to mount the telescope on a device that moves precisely with the rotation of the earth. But that's a whole other paragraph for another blog post.