Photos are all about using the light to the best of your ability.
As the triangle above shows, you basically have three things at your disposal.
Aperture: How much your lens is open. F-stops are a fraction, so an F-Stop of 3.5 is really 1/3.5. Put a different way, the bigger the number, the smaller the opening on the lens.
Your aperture is how you control depth-of-field. You pay a light "tax" to stretch your depth-of-field. Play around with the manual mode on your camera to see how it all works. At a given setting, closing the aperture (increasing the F-stop) will bring more of the background into focus, but you'll see the image getting darker as you do it.
Shutter Speed: This one is more self-explanatory. Your camera lets light in on the sensor for however much time the shutter is open. The darker it is, the longer the shutter has to be open to let enough light in to compose the same picture vis-a-vis a brighter environment. Like the aperture, you pay a "tax," this time in the form of blur, to keep the shutter open longer. Artistically, this may be a desirable effect. You can dial back the shutter speed to show motion of an object. A great example and easy way to test this would be with some sort of waterfall or flowing water. Take a photo with a really fast shutter speed and the water will appear to be frozen. Start lowering the shutter speed and the water will have moved a noticeable amount in the time the shutter is open, thereby creating motion blur.
ISO: This is your only way to "create" artificial light. As with everything, there's a "tax" you pay. ISO essentially brightens the pixels, making the entire image brighter. But it does this indiscriminately, so past a certain point, pixels you don't want brightened (such as a dark sky etc...) will also get brightened.
So, how do you use each of these?
Well, let's say you're taking a photo of someone in the shade, with a sunny background. You want both to be in focus. This isn't necessarily the easiest shot to compose and make it look natural, but here's a couple of thoughts:
Firstly, if you want both the foreground and background to be in focus, that instantly clues you in that you need a large f-stop (small aperture). Just how small is largely dependent on your camera and how much light you do have available.
So now you've got your depth-of-field taken care of, but you've reduced your amount of available light, and in a shady foreground, you've got a problem. The sunny background can handle a narrowing aperture since it has ample light available. So we need more light in the foreground, and our only* options are ISO or shutter speed. Depending on what you're shooting, you might be able to reduce the shutter speed to get more light on the foreground subject, and/or increase the ISO. Either would put "light" on your foreground subject, but it's going to do the same to the well-lit background, resulting in an overexposed, potentially washed-out background.
*So what do we do? Well, most cameras will have a flash. This is a perfect time to use it. A flash will dramatically increase light close to the camera, while doing nothing for the distant background. In doing so, you've effectively "balanced" the light situation. You're at a light deficit in the foreground until you use the flash, which won't affect the already well-lit background. Depending on the camera, you can change the power of the flash to get the right amount of light.