The aperture, also known as an F-Stop, relates to the amount of light that the lens itself physically allows into the camera. The lower the number selected, the more light you are allowing into the camera (Which is a good thing!).
Many common 50mm lenses will have an aperture of 1.8 which is indicated on the lens itself. This is the maximum amount of light that this lens will allow into the camera. The way that I think of this is that the lower the number is, the lower amount of resistance there is to the light entering. On the opposite side of the scale, if set to f.22 for example, you can see that the opening that allows light in is very small so is offering greater resistance.
The light that enters the lens is controlled by aperture blades within the lens itself which will move with each selection to physically construct a near circular or hexagonal shape in which to allow the light through. Depending on the lens or camera used, you may only see these blades in action once you take a shot or have engaged a depth preview feature, on others, you can clearly see these blades in action by looking into the lens itself as you make selections.
The aperture, much like shutter speed, would on first inspection appear to be purely practical, allowing measured amounts of light to enter but whilst practical in function, the selection that you make will have a huge creative effect on your capture. The aperture selection that you make will also affect the depth of field. The depth of field is the area within an image that is in focus. The smaller the aperture number, the smaller the focus area. For example, with portraits, a 1.8 or 2.8 aperture is often preferable because it allows you to focus narrowly on your subject and separate them from the background. They are in focus, the background is not.
However, in some candid or street photography, you often need to see some of the surroundings in order to contextualise the image. An aperture of 8 will allow a larger area of focus but still allow for some fall off of focus giving the photo a certain quality. It allows a margin for error almost, if shooting someone in action, you are more likely to capture them within a certain plain of focus. On the other side of the spectrum, an aperture of 16 to 22 will largely mean that everything from the foreground to the background will be in focus. This is important for when the background is as important as the subject, for an explorer about to conquer a mountain climb, or an artist in front of their work, it is important that you capture the whole scene.
Between the aperture and shutter speed,, you have a balancing act of light and its visual characteristics. In a portrait shot at 1.8 where you are allowing in a lot of light, especially on a bright day or when using a fast ISO, you will need to compensate for this by selecting a high shutter speed. You are effectively letting a lot of light in but closing the door quickly.
Later camera models may also have an aperture priority function. This allows you to choose your preferred aperture and it will then automatically choose a shutter speed to balance this and give you a good exposure.
When selecting a lens then it is important to consider what aperture it offers, a 1.8 or 2.8, especially with prime lenses, will give you that extra bit of light to play with at the end of a day when the light becomes sparse or when you creatively favour the option of shallow depth of field, utilised by many of the great portrait photographers.