“Affect” is usually a verb meaning to influence something (e.g., “Lack of sleep can affect your mood”), while “effect” is usually a noun meaning a result or outcome (e.g., “Lack of sleep harms your mood”); a simple trick is A = Action (affect does something) and E = result (effect is the result).