Any danger to life supersedes Shabbos. The quicker you act, the better. (ShA 1)
If a fire breaks out, extinguish it so it doesn’t spread and endanger the life of those who can't escape. (ShA 1 – MB 1)
If you saw a person go to an area that was struck by a landslide, break Shabbos to save him. This is true even if he may have already escaped – he might not be Jewish and he might be dead already. (ShA 3 – MB 9)
Certain people are considered dead already and are not allowed to be saved through breaking Shabbos. E.g. A person attempting to rob a house in a case that you are allowed to kill him. Another case is a mumar l’hachis. (MB 9)
Be mechallel Shabbos to prolong a Jew’s life for even one more moment. Examples: Crushed by an avalanche. Barely alive on his deathbed. (ShA 4)
We are obligated to push away all of the mitzvos to preserve a Jewish life regardless of future mitzva performance. Therefore we save a Jewish child who will not live until bar mitzva. We even save a deaf-mute and the mentally insane even though they are exempt from mitzvos. (BeH “ella”)
Rescue a Jew in danger even on Shabbos. This can include a capsized ship, flooding river, and a victim of attempted murder. However, if there is any real doubt about endangering your own life, do not attempt the rescue. Your life comes before your fellow’s life. (ShA 8 – MB 19)
Chazal allow a rescuer to return home carrying his rescue tools in order not to discourage him from Shabbos rescues in the future. (ShA 9 – MB 20)