Agentive -er is a noun suffix found in English which (generally speaking) nominalises a verb into an agent noun that illustrates that the noun is an agent towards the verb. It is occasionally spelt -or or -ar.
Sometimes this is attached to roots which are not used by themselves; examples include "author" (who does not *auth), and doctor (who does not *doct), and tailor (who doesn't *tail). Also, a scholar doesn't *schol, and a vicar doesn't *vic.
It is has an antonymous suffix, this being patient -ee; compare employer v. employee.
This morpheme is sometimes spelt ⟨-er⟩, sometimes spelt ⟨-or⟩ and occasionally spelt ⟨-ar⟩, and in ⟨martyr⟩ spelt ⟨-yr⟩. There are some spelling rules
Generally speaking, -or comes from Latin. There are some exceptions: ⟨sailor⟩ not *⟨sailer⟩.