Generally any situation or
scene in a movie, cartoon, comic, or even real life in which a
scene is done specifically to cater to what the fans want to see, divorced from a plot or any other non-catering need. Often mistaken as invented by Japanese
anime, the truth of the matter is that Hollywood movies and American TV shows in particular had been using this concept for years, if not decades, before anime ever even existed; however, the coined
word itself DID start within anime fandoms to reference scenes of near-nudity that held no part to the overall plot of the episode/movie/etc.
The
first film to involve nudity in the US was 1959, whereas the advent of the modern style and tradition of
anime was in the late 60's, hence fanservice existed prior to
anime.