This mode is the opposite of shutter mode (S). Here you select an aperture (the size of the hole in the lens when taking the image and the camera determines and appropriate shutter speed by sampling the light available in the scene.
The most important effect that changing the aperture can have on an image is to vary the DEPTH OF FIELD. This is the amount of the image that is in focus from the nearest element in the image right through to that part that is furthest away. Landscape and portrait images demonstrate this the most by having the main subject of an image in pin-sharp focus whilst anything in front or behind blurs as they are not the main element.
In fact, this mode is most used by these two types of photographers as it gives them excellent control of how their images are represented.
Consider the image below:
Your eye should be drawn to the centre of the main flower with the stamen (the bits that have the pollen) in good, clear focus – the focal point – and as you move outwards towards the edge of the image it blurs, with those elements farthest away from the focal point subject to the most blur. To make more of the image in pin-sharp focus, change the aperture so that the hole is smaller – i.e. step up and increase the f-number.