More specifically, it's a compound relative pronoun. It combines the function of a relative pronoun (like "who" or "which") and an interrogative pronoun (like "who" or "what").
Here's why:
* Relative pronoun: It introduces a relative clause, which provides more information about a noun. For example, "Whoever broke the vase will have to pay for it." The relative clause "whoever broke the vase" modifies the noun "whoever".
* Interrogative pronoun: It asks a question about a person or people. For example, "Whoever is responsible for this?"
Let me know if you'd like more examples!