Generally speaking, the difference is this:
一般来讲,这两个词的区别如下:

“affect” is a verb meaning to have an influence on, to cause a change in something (often negative),
“affect(影响)”,作为动词使用,指的是对某物施加影响,或导致某物的改变(常用作被动语态);

“effect” is a noun meaning a result.
“effect(影响)”,作为名词使用,指的是一种结果。

So, for example: If an area is affected by flooding, the effect can be devastating.
例如:如果一个地区遭受洪灾,那么,这种影响是毁灭性的的。

There are also less common uses of the words:
下面为大家介绍一下这两个词不常见的用法:

Affect
Affect (影响)

“affect” as a verb meaning to simulate, put on a false show.
“affect”作为动词使用,意思为假装,伪装。

I couldn’t believe it! At the meeting he affected total ignorance of the whole plan.
我真不敢相信!他在会上竟然装作一点也不知道这整个计划。

Although he’s British he affects a very convincing American accent.
虽然他是英国人,但是装出了一口地道的美国腔。

“affect” is also used as a noun, meaning a feeling or emotion, mainly in the context of psychology.
“affect”也可作为名词使用,表示一种感觉或情绪,主要描写某种心理。

Effect
Effect (影响)

“effect” can also be used as a verb, meaning to cause to occur, to bring into existence, execute (it often collocates with the word “change”).
“effect”也可以作为动词使用,意思是导致某事的发生;引致某物的出现;实现(通常与“change(改变)”搭配使用)。

The changes effected by the new legislation led to a comprehensive revision of our employment policies.
新的立法所造成的改变使我们就业政策得到了全方面修订。

“in effect” is an idiom that means in essence, to all purposes.
“in effect”作为俗语,意思是实际上,事实上。

The policy is, in effect, a tax cut for banks.
事实上,该政策是对银行的一次减税。

We should also note that there are some trade measures that are protectionist in effect, and have strong links with competition policy.
我们也应注意到,一些贸易措施实际上就是贸易保护。这些政策和竞争政策有紧密的联系。

Rules, legislation, agreements etc. can be said to come into effect or take effect when they start operating.
规则,立法,协定,等,表示“开始实施”时,可以用“come into effect”与“take effect”来表示。

The ban was agreed by international treaty in 2010, but did not come into effect until 2012.
这项禁令于2010年通过国际谈判达成一致,但是知道2012年才正式生效。

The changes took effect without any serious disruption to manufacturing processes.
这些改变奏效了,生产过程没有任何严重的中断现象。

“personal effects” means private belongings.
“personal effects”指的是私人物品。

He came to the house yesterday to pick up some of his personal effects.
昨天,他来的家里,取走了一些他的私人物品。

Comparison of “affect” and “effect” as verbs
比较:“affect”与“effect”作为动词使用

The changes to the regulations will affect savings.
= The changes will probably reduce savings.
政策的改变将影响储蓄。
=政策的改变很可能降低储蓄数额。

The changes to the regulations will effect savings.
= The changes will lead to new savings being made.
政策的改变将对储蓄产生影响。
= 政策的改变会刺激新的储蓄。