Many world religions, including Judaism, Islam and Christianity, promise salvation for their believers. To be saved from eternal punishment, according to these religious views, a person should follow the dictates of the sacred texts or teachings of that particular faith.
For example, Judaism traditionally considers salvation on the level of the nation of Israel; the Jewish holy text, the Torah (which includes the Old Testament of the Bible), tells the story of Moses leading the people of Israel to freedom from the slavery they endured under the Pharaoh of Egypt. God promises them that they will be saved as a collective people, rather than individually.
Christianity and Islam both stress individual salvation. Christianity teaches that each individual is born into sin; by believing in Jesus Christ and following Christian moral codes, a person will be rewarded with a place in heaven after death rather than the punishment of hell. Similarly, in Islam a person must follow the religious rules, known as the Five Pillars of Islam, and remain devoutly loyal to Allah and Mohammad in order to achieve the reward of salvation from eternal punishment.