'Affect' is a verb (to influence).
'Effect' is usually a noun (a result), but can also be a verb (to accomplish), for example ‘We’d like to effect this change’.