The words "affect" and "effect" are among the most commonly misused words in the English language. Though they can both be used as either a noun or a verb, this doesn't mean they can be used interchangeably, as the meanings of the words aren't interchangeable. In order to change how you use the two words, it's a good idea to know a little more about them.
Define "effect" as a noun. Using "effect" as a noun is the simplest usage of these words. Here, the word means a change or result or the way something acts upon something else. Consider these sentences: "The change in weather was an effect of global warming." "Global warming has a detrimental effect on the weather."
Define "affect" as a noun. You will rarely use "affect" as a noun, unless you work in a medical or social service field. As a noun, the word describes an aspect of behaviour, the way emotion relates to cognitive thinking. For example: "Though the patient is coherent and oriented, his affect is inappropriately flat."
Use "affect" in most situations in which a verb is necessary. In this case, the word means to have an influence on or to produce a change. You can easily know it's being used correctly by substituting the word influence or change to see if it makes sense. Consider: "We want to see whether driving in the dark affects safety." "We want to see whether driving in the dark influences safety."
Note the subtle difference in how "effect" is used as a verb. It's rarely used as a verb, but when it is, the definition is to cause something to happen or to bring about a result. If you cansubstitute the words "bring about" then you're probably using it correctly. For example: "The stimulus checks are designed to effect a better economic status for the country." "The stimulus checks are designed to bring about a better economic status for the country."
Assume, for the most part, that "effect" is the word to use when you're looking for a noun and "affect" is the word to use when you're searching for a verb. You're much lesslikely to be incorrect if you stick to that rule.
A more commonly-used derivative of the word "affect" is "affectation." This means the act of putting on airs or trying to behave in a certain way. For example: "His southern accent was pure affectation, put on to impress his future in-laws."