Temptation is a test of a person’s ability to choose good instead of evil. It is an enticement to sin and follow Satan instead of God. Part of the experience of this life is to learn to overcome temptation and to choose right over wrong. Modern revelation indicates that Satan does not have power to tempt little children until they begin to be accountable for their actions (see D&C 29:47).
Since the Fall of Adam and Eve, people have had an inclination to follow earthly desires and to succumb to appetites and passions. This life was given as a time in which God's children could learn to use their agency to overcome temptation and to choose of their own free will to follow Jesus Christ.
The last days in which we live are especially “perilous times” (2 Timothy 3:1). The influence of the adversary is widespread and seductive. Satan tries to deceive and to make sin seem appealing. But each individual can defeat Satan and overcome temptation. Each individual has the gift of agency—the power to choose good over evil. Those who humble themselves before God and pray continually for strength will not be “tempted above that which [they] can bear” (Alma 13:28). As they willingly obey the commandments, Heavenly Father strengthens them to withstand temptation.
The following principles also help:
Centering one’s life on the Savior. The prophet Helaman counseled his sons, “Remember, remember that it is upon the rock of our Redeemer, who is Christ, the Son of God, that ye must build your foundation; that when the devil shall send forth his mighty winds, yea, his shafts in the whirlwind, yea, when all his hail and his mighty storm shall beat upon you, it shall have no power over you to drag you down to the gulf of misery and endless wo, because of the rock upon which ye are built, which is a sure foundation, a foundation whereon if men build they cannot fall" (Helaman 5:12).
Praying for strength. When the resurrected Savior came to the Nephites, He taught the multitude: “Ye must watch and pray always lest ye enter into temptation; for Satan desireth to have you, that he may sift you as wheat. Therefore ye must always pray unto the Father in my name” (3 Nephi 18:18–19). In the latter days He has given similar counsel: “Pray always, that you may come off conqueror; yea, that you may conquer Satan, and that you may escape the hands of the servants of Satan that do uphold his work” (D&C 10:5).
Studying the scriptures daily. Nephi taught, “Whoso would hearken unto the word of God, and would hold fast unto it, they would never perish; neither could the temptations and the fiery darts of the adversary overpower them unto blindness, to lead them away to destruction” (1 Nephi 15:24; see also Helaman 3:29–30).
Filling one’s life with goodness. When life is filled with goodness, no room is left to do evil.
Avoiding tempting places and situations. Places or situations where temptations are likely to come should be avoided. Inappropriate material in magazines, books, television, movies, and music and on the Internet should also be avoided.
Striving to influence others for good. Latter-day disciples of Jesus Christ can be in the world but “not of the world” (see John 17:14–18). They can strive to influence others to live good and wholesome lives by setting a righteous example, being a good friend, participating in community service, and, as appropriate, letting their voices be heard in defense of moral values.
Never hesitate in decisions to withstand temptation. The Savior “suffered temptations but gave no heed unto them” (D&C 20:22). When Satan tempted Jesus in the wilderness, the Lord never wavered. His answer was quick and firm: “Get thee behind me, Satan” (Luke 4:8). James counseled: “Resist the devil, and he will flee from you. Draw nigh to God, and he will draw nigh to you” (James 4:7–8).