The difference between affect and effect is simple to understand but difficult to put into practice. Here is the rule: affect is a verb and effect is a noun. These are generalities, of course because nothing in the English language is ever simple and there are always exceptions to the rule. I digress. Here are some example sentences so that you can understand the use of the two words:
How will eating peanuts affect her peanut allergy? (Verb)
Eating the peanuts had the effect of causing her to break out in hives. (Noun)
There are some special cases where the reverse is true. Affect is used a lot in psychology to talk about someone’s mood:
She had a sad affect when she broke in hives from eating peanuts.
The hives had the effected her by making her itchy and uncomfortable.