Both words can be either a verb or a noun. Confusion on the use of these is common in American English.
An effect, as a noun, is the consequence of something; a cause has an effect.
To effect something, as a verb, is to put it into practice, or to actualize it.
Affect, as a noun, is probably mostly limited to psychological discussion; it it not a commonly used word.
To affect something, as a verb, is to change it, or, to really confuse the issue, to have an effect on it. Affect as a verb also has a lesser meaning of pretending something.