The aperture of a camera is a fairly simple device but is often a point of confusion for new photographers. The aperture is simply the size of the hole that the light travels through to get to your sensor. The smaller the hole, the less light. The bigger the hole, the more light. Simple, right? Right! But not really!
Where the confusion comes in for new photographers is in dealing with the way in which the aperture is represented. We call it an f-stop. The different sizes of the aperture are referred to as a fraction such as f/4, f/11, and f/22. I think some people think that the "f" means f-stop. But it doesn't. The "f" is a variable that represents the focal length of the lens. Yes, I know. No one told you that you'd have to do math for photography. And really you don't. But you do have to remember that the bigger the number on the bottom of a fraction, the smaller the number the fraction represents. So even though 22 is a bigger number than 4, f/22 is a smaller fraction than f/4, so it represents a smaller aperture. If you really wanted to get technical, you could plug in the focal length of your lens into that fraction and figure out exactly how big an opening you'll have. So if you have your 50mm lens attached and are shooting an f-stop of f/4, then your aperture will be 50/4 or 12.5mm. If you set your f-stop at f/22, then your aperture opening is 50/22 or 2.27mm. That's a pretty small opening.
So the size of the aperture controls the amount of light entering your camera. But, like shutter speed, there is a side effect. The size of the aperture also determines how much of your scene is in sharp, or what we call "acceptable", focus. The term for the amount of the scene that is in acceptable focus is "depth of field". The depth of field is easier to relate to the f-stop number. The higher the f-stop, the greater the depth of field. So, for example, f/22 would give you a much deeper depth of field than f/4. The best way to understand this is if you were shooting a flower up close and wanted to make sure that the background was out of focus, you would shoot at a low f-stop number such as f/2. If you were shooting a mountain landscape and wanted everything in focus, you would shoot at a high f-stop number such as f/32.
But you have to remember the main purpose of the aperture, controlling the size of the opening and therefor the amount of light entering the camera. So shooting that flower at f/2 will mean a shallow depth of field with everything in the background out of focus, but it'll also mean a bigger opening and therefor more light entering the camera. So.... you will have to shoot at a faster shutter speed to get the right exposure. Likewise, that mountain landscape that you shot at f/32 will mean a very small aperture opening, and so a lot less light entering the camera, so you'll have to slow down your shutter speed to get a good exposure.