To take a photo you simply have to get three factors to agree: ISO, aperture, and exposure time. Your camera has different modes to help.
M - ISO fixed. You have to make aperture and exposure match by yourself.
A - ISO fixed, aperture selectable, exposure adapts.
S - ISO fixed, exposure selectable, aperture adapts.
P - ISO fixed. Uh. You can turn the dial. Things change. Nobody really knows what is being selected but you can control... something.
AUTO - your camera is inhabited by a demon. Nobody knows how this works. Sometimes the flash will pop up and fire at random. Good luck.