The World of Ice and Fire is a history book, compiled by Maester Yandel.
The book shamelessly panders to House Lannister and Joffrey Baratheon, as Yandel was seeking to curry favor with the throne. It was poorly received at the royal court - where most preferred the Testimony of Mushroom, which included far more sex scenes (which Mushroom insisted he did to make his narrative more "dramatically satisfying").
In the books
The World of Ice and Fire was published in real-life in 2014, presented as being an in-universe history book. It presents the expansive backstory of The Known World of Westeros and beyond, much of it never revealed before in the main novels. It has not yet been mentioned within the main novel series, though it is considered to be fully part of the book-continuity canon.
It was produced as an extensive collaboration between George R.R. Martin himself and his long-time collaborators/fact-checkers, Elio Garcia and Linda Antonsson, who run the fansite Westeros.org. The project lasted nearly ten years: originally it was intended that Elio & Linda would write most of it as a summation of what was already mentioned in the novels, with Martin writing a few sidebars, but ultimately he produced vast new amounts of material both about the past of Westeros, and about the lands beyond it (actually expanding to detail the histories of lands east of the Dothraki such as Yi Ti, which are barely even mentioned in the main novels).
Originally the authors found it difficult to simply present an objective compendium/encyclopedia of events, because it would give away major revelations: would an article on Jon Snow actually state that he isn't Ned Stark's son, but Rhaegar Targaryen's? Would an article about Jaime Lannister explain why he really killed the Mad King, even though that is a secret revelation only given in the third novel? The answer they came up with was to present it as an in-universe history textbook written by "Maester Yandel". Yandel is the author-avatar of Elio & Linda, but at times he quotes from an earlier and more expansive history textbook written by "Maester Gyldayn" (the author avatar of George R.R. Martin). Thus the book isn't objective, but represents what is common knowledge to the average and reasonably well-informed lord in Westeros - i.e. most people actually know the general events of the Robert's Rebellion but in the core novels they don't halt the narrative for a dozen pages to give a long speech detailing everything about it. Similarly, most people in real life know the general outline of World War II, but characters in television and movies don't stop to give long speeches outlining the entire event, because they and everyone around them already knows it.
Martin actually wrote a much longer history of House Targaryen which had to be edited down for the excerpts in The World of Ice and Fire - these will eventually be collected into a future volume that will be called Fire and Blood.