Both words can be nouns (naming objects, actions, states of being, etc.) and verbs (describing the action) - just as the word "love" can be both a noun and a verb.
But the interesting thing about "affect" and "effect" is that their meanings as nouns and verbs seem to sort of reverse themselves.
As a verb, "effect" means the same thing as "bring about," "produce" or "accomplish." A certain law might be designed to effect greater fairness for everyone. As a verb, "affect" means to "have an influence on" something. So, that same law should affect the way people live, work, speak, play, eat, and think, in order to effect the change it is designed to produce. (Having fun yet?)
As a noun standing alone, "effect" is essentially synonymous with "result" or "consequence." [Did that law have the effect you wanted it to have?] But "effect" is also used in compound expressions, as Sky321 mentions, and as a plural ("effects") it refers to personal belongings, as Tusitala Tom mentions.
As a noun, "affect" has a very specific and limited meaning that is used in psychology: mood or feeling. A person who does not express feelings is said to have a "flat affect."