If you are not sure use who and 99.9% of the time you’ll be right.
Who is used as the subject of a verb. In questions it is used when asking which person or people did something, or when asking what someone’s name is.
Whom is used in formal writing as the object of a verb or preposition. It is rarely used in questions.