“Effect” is a noun, while “affect” is a verb. You can cause effects, by affecting something. “Affecting” is the act of causing effects, while “effects” are the actual causes of an affliction.
As an example, let’s say you get drunk. There are two different ways to phrase the same scenario: you are feeling the effects of the drinking, or you are being affected by the drinks. The end result is the same, but you need separate words for them.
In the former, you are feeling the effects. Feeling is the verb, effects is a noun. The same way you would feel the clothes against your skin, or the ground beneath your feet. But with the latter phrasing, the drink is acting upon you, so you need a verb; You are being affected by it. The same way you would be affected by someone else in the bar pushing you. Falling over is the effect, because you were affected by the push.