Most people confuse them when they're talking about something changing another thing.
That music effected me greatly.
Effect, with an "e," isn't used as a verb the way "affect" is, so the sentence above is incorrect. When you're talking about the change itself -- the noun -- you'll use "effect."
That music had a great effect on me.
When you're talking about the act of changing -- the verb -- you'll use "affect."
That music affected me greatly.