Maesters forswear their former fealties once they pass the entry exams and such at the Citadel and forge the first link of their chain. From that point on, they serve the Citadel first and their assigned lord second. A maester gives up their old surname upon forging that first link in their chain, so for instance, Maester Aemon at Castle Black gave up his surname of Targaryen and thus his right to the throne of Westeros (IIRC, he was the elder brother of the last Targaryen king, (then prince) but didn't want to rule or get in his brother's way, so took up the maester's chain and thus forswore his claim). Maesters occasionally return to the Citadel (if away) if and when their lords allow, to forge additional links in their chain upon mastering different areas of lore. Each chain link is of a different material, indicating what it represents mastery of. Maesters with a short chain wear it attached to a neck string, until they have forged enough links to wear the chain around their neck unaided. They do not remove their chain. Maesters are sworn to service, can own no lands, can hold no titles (other than maester, archmaester, or grand maester), can sire no children, and cannot marry. So far as I know, only males can become maesters.
Maesters get sent to serve at a particular place or for a particular family. For instance, there's the three (I think) maesters serving in the Night's Watch, one at each of the strongholds there, with each of those maesters serving whoever is currently in charge of their resident stronghold. Then there's the grand maester serving in King's Landing, working for the King and royal family. There are also the archmaesters residing in Oldtown, mostly living in the Citadel, leading the guild. Most maesters though are assigned to serve the head of a particular family, such as Maester Luwin who served Lord Stark in Winterfell. A maester is generally respected, but not always.
Maesters are the most educated folk in Westeros. They may come from peasant families or noble families, it makes no difference, but they must work hard to pass the entry exams before being accepted as a maester and forging their first chainlink. Many maesters are multilingual to some extent, learning a few or several modern and ancient languages of Westeros and other lands (i.e. they might know bits and pieces of Ancient Valyrian, or the language of the Ghiscari, or the language of Myr, or the language of Braavos, etc.). A maester is typically knowledgeable in many fields, serving not only as a scholar but also as a doctor, surgeon, herbalist, poison-maker (need to know about poisons in order to know how to treat them and make antivenoms/antitoxins), mapmaker, scribe, advisor, storyteller, record-keeper, messenger-raven trainer and caretaker, geographer, artist (for practical purposes), keeper of ancient lore and legend, and scientist/naturalist/inventor (scientifically-related knowledge is somewhat limited, but maesters typically know some basic engineering and architectural principles and devices, as well as at least basic knowledge about many plants and animals). Some maesters may also be somewhat familiar with alchemy or sorcery, but IIRC this is relatively rare knowledge for maesters. One of the archmaesters in Oldtown is called the Mage because he dabbles in sorcery and magic-related knowledge, and even his understanding of magic is very limited. He lives as a virtual hermit in a tower on a small island in the river, barely respected at all and nearly devoid of any influence in the Citadel despite being an archmaester; the study of magic-related lore is looked down upon by most maesters.
In the D20 game, a maester character would likely serve primarily as a doctor, sage/advisor, linguist/translator, and possibly engineer and/or poisoner. Also, keeper of his or her lord's ravens, for delivering letters to and from other cities/strongholds/outposts. Maesters can be skilled in a great many different things, but few are very competent in battle, and most are in relatively poor shape since their profession involves an awful lot of sitting, reading, and writing. Some maesters may be skilled in forensic investigation to some extent.