Affect is usually a verb meaning to influence something.
- Lack of sleep can affect your concentration.
- The weather affected our plans.
- Stress can affect your health.
Effect is usually a noun meaning a result or consequence.
- The medicine had a positive effect.
- What was the effect of the decision?
- The new policy had little effect.
Easy way to remember
Affect = action/influence
Effect = end result
There are exceptions, particularly in formal or specialist writing, but this rule works for most everyday situations.