What is the grammatical term for the word for someone who does something?

They are called agent nouns.

A noun denoting someone or something that performs the action of a verb, usually ending in -er or -or, e.g. worker, accelerator.

— Oxford