Firing the Shotgun
When you pull the trigger you cause the firing pin to strike the primer of the shell and fire the shotgun. As the shell fires the action remains securely locked together.
Shell Ejection
When the shell fires, it expels gasses which press against the weapon's operating rod and unlocks the breach. The expanding gasses then push the bolt rearward; the retreating action pulls out the expelled shell and ejects it out of the action.
Reloading
After the empty shell ejects, the bolt is pushed forward by springs, loading a fresh shell into the action. As the shell seats into position the action locks, until the shotgun is fired again--or is manually released.