“Effect” usually is a noun and is a synonym for “result”: “The drug’s effects quickly wore off, requiring an extra dose of Novocain.” The word occasionally is used a verb meaning “to bring about”: “Rosa Parks’ actions effected change.”
“Affect” typically is a verb: “The drugs affected him.” It is not commonly used as a noun except in psychology. Even then, it’s rare. Trying to use the word as a noun can result in all sorts of bloated language and zombie nouns.
Even with that explanation, the words can be confused. They sound similar, and they’re often used in similar settings, as in the drug examples. One way to determine which word is the right one is to determine whether the word required is a verb or noun. The other way is to replace the word with an equivalent, a synonym. Of course, once the equivalent has been used, it may not be necessary to continue the battle between the two words. Their equivalents often perform the same function better than the originals.
How do remember whether to use “effect” or “affect”? Do you have a writing wrong that is in need of righting? Let me know on my Facebook page.