In “Program” mode, the camera automatically chooses the Aperture and the Shutter Speed for you, based on the amount of light that passes through the lens.
This is the mode you want to use for “point and shoot” moments, when you just need to quickly snap a picture. The camera will try to balance between aperture and shutter speed, increasing and decreasing the two based on the intensity of light. If you point the camera to a bright area, the aperture will automatically increase to a bigger number, while keeping the shutter speed reasonably fast. Pointing the camera to a darker area will decrease the aperture to a lower number, in order to maintain a reasonably fast shutter speed. If there is not enough light, the lens aperture will stay at the lowest number (maximum aperture), while the shutter speed will keep on decreasing until it reaches proper exposure.
I personally don’t use this mode often since it does not give me much control over the exposure. You can override the camera-guessed shutter speed and aperture by moving the control dial; this varies from camera to camera.