Affect means to do something or have an influence on something while 'Effect' means to make or carry out.
E. g. How will this affect your health?
Effect is commonly used as a noun meaning the result or impact of something, an outcome. If there's "a/an/the" in front of it, it's an effect.
E. g. The effect of working on a computer for long hours.
The difference between the two words is so slippery that people have started using the word 'Impact' instead. Another trick is to remember that affect comes first alphabetically, and an action (to affect) has to occur before you can have a result (an effect).
Doubts on this article