Affect is almost always a verb. Effect is almost always a noun.
To be more specific: Affect is almost always used as a verb (an action word) meaning “to act on” or “to produce a result.” Effect is almost always used as a noun (a thing) meaning “a result,” “a consequence,” or “something produced by an outside cause.”
Now for some examples:
How will the hurricane affect the price of oranges?
What effect will the hurricane have on the price of oranges?
Note the difference? In the first sentence, affect is used as a verb. In the second sentence, effect is used as a noun. Let’s try another set:
I don’t like the way this medicine affects me.
This medicine has some bad side effects.
Now, you will note that I used the word “almost always” in both instances. Like many rules of the English language, there are exceptions. The good news is the exceptions are very rarely used.
Affect can be used as a noun meaning an emotional response (such as a facial expression or tone of voice). Psychologists are about the only people who use affect as a noun, and the phrase is usually, “He/she has a flat affect.”
Effect can be used as a verb meaning “to bring about” (which is similar, but not exactly the same as the verb affect). The phrase most commonly used is “to effect a change.”
So unless you are using the phrases, "He/she has a flat affect" or "effect a change," you are probably correct in assuming that affect is a verb and effect is a noun.
How will that knowledge affect your writing? I believe it will have a great effect.