I can't imagine their work would be exactly like that of modern librarians, but what did they actually do? Could they go to some sort of school to train for the position? How were they chosen?
We simply don't have much information about staff at ancient libraries, other than (sometimes) the scholars who were in charge at a given time. But they were always scholars of one description or another. So in the case of Alexandria, that means people like Zenodotos of Ephesos, Apollonios of Rhodes, Eratosthenes of Cyrene, Aristophanes of Byzantium, Apollonios Eidographos, and Aristarchos of Samothrace; in the case of Pergamon, I believe the only head of the library whose name is known is a 1st-century BCE Stoic philosopher named Athenodoros; and in the case of the Palatine library in Rome, we know of the 1st century BCE/CE astronomer C. Julius Hyginus.
Let's take a few examples. Zenodotos started out as a scholar studying under Philitas of Kos, and in Alexandria he got the job of tutoring the Ptolemaic princes of his day. This station led to his appointment as director of the Mouseion (the institution that housed the famous libraries). All his scholarly work we know of was on philology: we know he invented a critical apparatus, and produced scholarly recensions of several of the "classical" poets. His work survives only as third-or-more-hand reports, very piecemeal, in Byzantine compilations of scholarship on the Homeric epics.
Eratosthenes apparently studied in Athens, and was headhunted by Ptolemy III to Alexandria, where he reportedly continued to study under the major scholar/poet Kallimachos. He may also have been tutor to one of the princes once he got there. We don't know at what point he was appointed director of the Mouseion, but he was, and he was one of the two most prominent people ever to hold that position (the other being Aristarchos): he wrote enormously important works in a wide variety of fields, including poetry, philology, geography, historiography, and mathematics. We know nothing directly about his later life, but he is justly one of the most renowned figures of Hellenic antiquity, and was celebrated in Egypt during and after his lifetime (one city had its hieroglyphic name changed to a plumb-bob symbol, in honour of his measurement of the circumference of the earth). Despite that, only one of his works may possibly survive (it's hard to assess how much it changed after it left his hand), though we have a large amount of information about his other work.
Hyginus is a neat counter-example. He started his career as a slave, we don't know for sure where (possibly Alexandria, possibly not), but with a good education he got into the good graces of his owner, who happened to be Augustus. Sometime after Augustus became princeps, he freed him and appointed him head of the Palatine library. Hyginus wrote a respectable amount of scholarship on various subjects including philology, geography, and astronomy (the last is the only piece that survives intact; it's apparently based heavily on Eratosthenes), taught extensively, and earned the respect of Ovid. However, he was poor, had to be supported by a Roman aristocrat his whole life (not Augustus), and died in poverty.
So I suppose you could say that getting the job was a combination of being very well educated, very talented, and very lucky -- much like nowadays: knowing your future employer was certainly a big bonus, but Eratosthenes shows that raw hard work and talent could sometimes impress people.
As /u/vonadler points out, libraries were not open open like some public libraries are nowadays. But they were pretty open, for a rather specific definition of the word. People who weren't professional scholars could use them by hiring scribes to go and copy books for them. We know this especially thanks to the survival of one such copy, the sole surviving manuscript of Aristotle's Constitution of the Athenians, which was commissioned by a rancher in inland Egypt who gave four professional scribes a bunch of his old administrative documents and got them to copy the book onto the back of them. The economics of the situation -- he could afford the scribes, but economised on the papyrus -- suggests that scribes were pretty cheap, as these things go. Books were more expensive than they are today, but not out of reach for non-aristocrats: imagine prices similar to US college textbooks (the Elsevier/Springer kind of textbook), and you won't go too far wrong.
First of all, one needs to distinguish modern public libraries from ancient libraries, which were anything but public.
The library of Alexandria was the royal library of the Ptolemaic dynasty - its purpose was primarily twofold.
Firstly, it was an archive for the administration of Ptolemaic Egypt. A large percentage, probably a majority of the documents in the library were tax censuses, bookkeeping and other documents relating to the administration of the realm and tax collection.
Secondly, it was a collection of literature to show off the wealth and prestige of the Ptolemaic rules of Egypt.
The most common job in the library of Alexandria was that of a writer. Since the papyrus everything was written on decays within about 20 years in Mediterranean climate, there was a small army of scribes constantly copying decaying scrolls unto new papyrus at all times.
Access to the library itself and its texts were restricted to those with royal approval - often high clerics and clerks as well as royal favourites. There were no strolling in and reading texts by the common man as one could imagine from a modern library.
Those that worked at the library would have been literate people that were fine with a lifetime of writing.
I'm not sure to what extent I'm going to be talking out of my ass, but I have my MLIS, have worked in libraries, and majored in classical studies so I feel like I should have an opinion.
In general the responses have hit on what I think the central truths of the a) the non-public nature of libraries in antiquity, and most relevantly b) the central relationship of libraries to either large governments or moneyed individuals, who could afford the time and energy for literate pursuits (and who craved prestige and acclaim).
The simplest answer? I'm not convinced they would have had librarians in the modern sense. Modern libraries have, for the most part, evolved within the context of an information explosion brought upon by the Renaissance, enlightenment, spread or literacy etc. especially now, in the information era, there is effectively unlimited information being produced by very large numbers of groups and individuals. Modern libraries, whether public, private, corporate, academic, etc. support a complex educational matrix which antiquity simply did not have. Modern public libraries serve solely for the public good; support an informed and educated population, support community development, and support the research endeavours of the public at all levels. The modern library within an informational boom has given rise, unsurprisingly to the modern information professional, or "librarian", as well as all of the facets of librarian-ey-ness: complex cataloging systems, reference services, research assistance, etc.
A librarian does not know all of the answers: they just know how where to look and how to find them. This requires expert study at masters or college diploma level in a modern world, with millions or authors creating billions of books, articles, series, and papers. In the ancient world, with a significantly more limited number of authors, producing vastly fewer works, for a very small subset of the cities population and whichever visiting scholars could be lured to the city at any given time. Realistically I imagine that literate slaves would have been the ones operating the libraries on a day to day basis, probably overseen by literate imperial overseers who made sure scholars had all the materials they needed to make the city a hub of learning/increase the standing of the glorious Caesar/king/pharaoh/bro-of-Alexander/leader/rich guy.
I am on my cell phone at the moment so maybe I will expand on this when I am back around a computer if people are interested? I should probably edit it in any case...
EDIT: I forgot to get to my point and answer your question. What did ancient librarians do? Manage and grow the collection: find out who is writing what, where, and whether it's worth getting a copy of. Collection management is still a core duty and an essential task of the librarian today, although as I argued early within very different contexts. Additionally they probably needed to be up-to-date on what the significance of those writings had, and consult with scholars who needed an update.