Here is a diagram of how a Digital SLR camera works
Once the shutter button is pressed the mirror flips up, the shutter operates and the image is captured on the image sensor.