Affect is usually a verb, and effect is usually a noun. To affect something is to change or influence it, and an effect is something that happens due to a cause. When you affect something, it produces an effect. Here are a few examples of the words used correctly in these senses:
The storm knocked down power lines, affecting several thousand people in rural communities. [CBC]
Gauging the disaster’s effect requires assessing economic activity that might be lost. [Wall Street Journal]
The regulator has estimated that its new rules will affect up to 11.3pc of borrowers. [Telegraph]
But the smell of freshly baked bread may have positive effects far beyond the obvious ones. [Independent Online]
But the words have other, less commonly used senses that can make them tricky. Effect does function as a verb when it bears the sense to bring about. For instance, it is the correct word in phrases such as effect change and effect solutions where these phrases mean to bring about change and to bring about solutions. It’s possible to imagine where the phrase affect change might make sense, but it would mean to have an effect on change rather than to bring about change.
These writers, for instance, use affect where they obviously mean effect (i.e., to bring about):
His genuine desire to affect change was thwarted by a system which is stale and often ineffectual. [Independent]
This event shows that the press still has power, that written words can still affect change. [Indiana Statesman]
And these writers use the verb effect correctly:
Plenty of footballers do use their income to effect change, notably African players working in their home countries. [Independent (U.K.)]
Indeed, rushing to the Supreme Court is not always the wisest method for effecting legal change. [New York Times]
Affect, meanwhile, has a secondary, less-used verb sense—namely, to put on a false show of. For example, you might affect surprise when someone gives you a gift you knew they would be giving you. Affect also has a potentially confusing noun sense—a feeling or emotion, especially as expressed through body language. Most of us will never have use of this sense, though, so its existence is no excuse for letting affect encroach on effect‘s territory.