Perhaps the most important thing to appreciate is that your image is only converted into digital form well after it has left the sensor.

The sensor itself is an analogue component, creating an old-fashioned electrical signal that can be tweaked by electronic circuitry to increase the ISO, for instance, amplifying the signal in much the same way as you crank up the volume on your radio.