The pronoun who is a subjective pronoun and that means that we use it wherever we would use the pronouns I, he, she, we, or they. (e.g. This is who told me the truth.)

The pronoun whom is an objective pronoun and we use it wherever we would use the pronouns me, him, her, us, or them. (e.g. I wondered whom he was mentioning.)