Both of these words can be either verbs or nouns, which makes distinguishing them a bit tricky. First let's take a look at affect.
Usually affect is used as a verb; its meaning is to influence or make something different. It is used with a direct object unless it's used in the passive voice. In that situation we use the preposition "by".
Ex. The pollen in the spring affects my allergies severely. (active voice-direct object)
Ex. The stock market was affected by the economic downturn. (passive voice-used with by)
Affect can also be used as a noun, but only in regards to psychology. It describes a symptom.
Ex. Since the onset of his depression, his affect has been lethargic.
Effect is usually used as a noun describing the result or impact of one thing on another. It takes on the preposition "of" and "on".
Ex. The effect of pollen on his allergies is severe during the spring.
Ex. The effect of the economic downturn on the economy is clear.
Effect can also be used as a verb, but it's less common than its usage as a noun. It means to realize or cause something to happen.
Ex. President Obama effected change by passing new health care policy.
Is that clear? If you happen to have any doubts, leave your questions below!