-er (1)
English agent noun ending, corresponding to Latin -or. In native words it represents Old English -ere (Old Northumbrian also -are) "man who has to do with," from Proto-Germanic *-ari (cognates: German -er, Swedish -are, Danish -ere), from Proto-Germanic *-arjoz. Some believe this root is identical with, and perhaps a borrowing of, Latin -arius.

In words of Latin origin, verbs derived from past participle stems of Latin ones (including most verbs in -ate) usually take the Latin ending -or, as do Latin verbs that passed through French (such as governor), but there are many exceptions (eraser, laborer, promoter, deserter, sailor, bachelor), some of which were conformed from Latin to English in late Middle English.

The use of -or and -ee in legal language (such as lessor/lessee) to distinguish actors and recipients of action has given the -or ending a tinge of professionalism, and this makes it useful in doubling words that have both a professional and non-professional sense (such as advisor/adviser, conductor/conducter, incubator/incubater, elevator/elevater).
-er (2)
comparative suffix, from Old English -ra (masc.), -re (fem., neuter), from Proto-Germanic *-izon, *-ozon (cognates: Gothic -iza, Old Saxon -iro, Old Norse -ri, Old High German -iro, German -er), originally also with umlaut change in stem, but this was mostly lost in Old English by historical times and has now vanished (except in better and elder).
For most comparatives of one or two syllables, use of -er seems to be fading as the oral element in our society relies on more before adjectives to express the comparative; thus prettier is more pretty, cooler is more cool [Barnhart].
-er (3)
suffix used to make jocular or familiar formations from common or proper names (soccer being one), first attested 1860s, English schoolboy slang, "Introduced from Rugby School into Oxford University slang, orig. at University College, in Michaelmas Term, 1875" [OED, with unusual precision].