Okay, so when the shutter opens, the camera begins taking in light. On many cameras, the shutter can stay open indefinitely. This lets the sensor (on a digital camera like I used) or the film (on an old camera) keep taking in more and more light. If something in the frame of the camera is really bright, even just for some of the time, it will show up bright in the final picture. Okay, that’s the sciency part. As for how I took this specific picture…
I set the lens for 30 seconds, with a two second delay so I could get in position. My buddy was standing in Portal position. I ran behind him, pointed an LED flashlight at the camera, and traced around the front half of his body. At some points, I had to slow down. This let more light into the sensor at that part, which is why you see a bright flare behind his neck. After I traced the front of his body, I told him to move to the next position. Before I followed, I drew the Portal around where his body was. It was pretty much just luck that it lined up so well, especially since this was our first attempt. After I drew the Portal, I switched to an incandescent flashlight, which is much more yellow. We repeated the process, but with the back half of his body. We finished just as the 30 seconds were up.
Now that I’ve written all of that, a simple analogy comes to mind. Think of it as painting. The flashlight is a brush, and the camera in the canvas.