Rupert Giles (often referred to simply as "Giles") is Buffy Summers' mentor and protector in the popular fantasy/horror television series known as Buffy The Vampire Slayer - he worked as the librarian of Sunnydale High until its destruction during the Graduation Day battle with the supervillain known as Mayor Richard Wilkins but was also a member of the Watchers' Council, who were a society devoted to monitoring the actions of a Slayer and providing her with her own Watcher (basically a guide to teach her the ways of being a Slayer).
However Buffy wasn't a traditional Slayer by any sense of the word and neither was Giles a traditional Watcher and due to the unethical practices of the Watchers' Council Buffy ultimately quit, but not before Giles himself was fired and replaced with Wesley Wyndam-Price (who himself would later become rogue).
Despite losing his official title as Watcher he still aided Buffy throughout this time as Wesley was a rather incompetent and cowardly individual at that point (which would change during his later appearances in Angel) - this highlights one of Giles' main traits in the series: that of a surrogate father of sorts to Buffy.
Although often welcomed sometimes the close link Giles shared with Buffy had rather comedic (if embarassing) consequences, which was highlighted in an episode where Buffy gained telepathic abilities via killing a demon and via her psychic link found out that Giles had sexual relationships with her mother, though this was due to events that occured in "Band Candy" where the vampire Mr. Trick had turned the adult population of Sunnydale into teenagers (at least emotionally) via cursed chocolate - both Joyce and Rupert were embarassed by what had occured and never pursued the relationship further.