You are apparently asking about the Xerographic process, such as used in original copy machines and now in laser printers.
The process works by charging up the surface of a cylinder (the drum) to a high voltage. The drum then rotates so that any parts of it that are charged pick up black particles, called the toner. Then a piece of paper is pressed against the drum as it rotates further. That causes the black stuff to stick to the paper. The paper is then heated and squished to make the black stuff stick to the paper permanently.
Note that you end up with black on the paper wherever there was electric charge on the drum. As I described things above, the drum was charged everywhere, so the paper ends up all black.
If only we could selectively discharge parts of the drum, then we could end up with white areas on the paper. Fortunately there is a way. Instead of making the drum out of purely insulating material, we make it out of material that insulates unless it gets hit with light. Early drums were made from selenium, for example. If we connect the inside of the drum to low voltage (discharge potential), then all we have to do is shine light on the areas where we ultimately want the paper to be white. The light discharges the high voltage on the surface of the drum, which causes that area to not pick up toner, which won't make the paper black.
So now we have a way of exposing a image onto the drum surface, and ending up with that image on a piece of paper. This is exactly what early copiers did. A strip of bright light was shone on the original to be copied. The image of that was optically focused onto the drum as it rotated and the bright light strip moved along.
Laser printers use the same principle, except that a modulated laser "writes" onto the drum to discharge it, instead of the optical projection of the paper to be copied. Since the modulation of the laser doesn't have to come from scanning a original, you now have a "printer" that can discharge any pattern on the drum, which means it can produce any pattern of black/white on the resulting piece of paper.
Modern copiers are really digital scanners with a laser printer back end. There is no longer a direct optical connection between the original and the drum. This allows for image processing, enhancements, storing the result, or even generating the pattern in a computer without ever scanning any original (printer versus copier).