The majority of the time, affect is used as a verb, and effect is used as a noun, but both words can be either part of speech.
- verb: to influence
- noun: emotion, manifested through facial expression or body language
- noun: a result
- verb: to bring about
Grammar Girl on affect v. effect