Affect is usually a verb, and effect is usually a noun.
to affect = to have an effect on someone or something.
His words affected her deeply.
His words had a powerful effect.
Less common uses:
How can we effect a change in people’s attitudes?
(Here, effect is a verb meaning ‘make happen’.)
In psychollogy, affect (noun) = mood or mental state.