As a really bad analogy, consider taking a photo to be the equivalent to filling a bucket with a hose. If the bucket has very little water in it, then that is the equivalent of a dark picture. If the bucket is overflowing with water, then the photo is bright white. If it is half full then the picture looks about right.
Now consider the hose, it has 3 variables:
- The diameter of the hose (call this aperture (1))
- The speed the water is coming out of the hose (call this ISO)
- The time that the hose is turned on (call this shutter speed)
So for a given bucket size you can independently adjust any of the 3 parameters in order to fill the bucket. But in order to fill the bucket to just the half way mark, you need to balance all 3 of them together.
EG if you halve the diameter(2) of the hose, you could compensate by either increasing the speed of the water coming out of it, or you could double the length of time that the hose is turned on.
The exposure of a photo works in a similar way to filling the bucket (and in fact the sensors of digital cameras are know as buckets, and you fill them with electrons).
So for any given image the exposure is a function of Aperture, ISO and Shutter speed. And that you can get an equivalent exposure by manipulating any 2 parameters at the same time. EG decrease the aperture (f/x number becomes larger) and increase the time the shutter is open in order to let the equivalent amount of light pass through in the time that the shutter is open.
For a much better explanation of this, take a look at Exposure Value which goes into the math a lot more.
(1) Aperture indication on cameras is standardized a "f/x" so that the smaller "x" number means that more light is allowed to pass though
(2) Technically halve the area of the hose, but I'm playing fast an loose here