The Treebrary is, as the name suggests, a tree that is also the library of Ponyville. It's also known as Golden Oaks Library, and is the home of Twilight Sparkle, who runs the place with her assistant Spike. It is where the well known Elements of Harmony are kept.
Twilight lets beloved ponies in to see if they want a book.
Others who reside here are Owlicious, Pee-Wee, Twibot, and Flicker.
This is a great place to find books for there are a lot in here!
The Treebrary served as many roles including being Twilight's home and sanctuary for when she wasn't feeling good, and being the 'go to' place for solving so many of the daunting problems that faced the Mane 6.
Several months after being crowned Princess, Twilight was faced with a new threat. Tirek. During the crisis, Tirek confronted Twilight, intent on stealing her alicorn magic and in the ensuing battle, The Treebrary was destroyed. Thanks to Twilight, Owlicious, the only inhabitant at the time, was saved.
Everything else inside the Treebrary was burned and destroyed. Today, only its ruins remain.
Twitterponies Continuity Additions
Dr. Whooves, with knowledge of the upcoming destruction of the Treebrary, materialized the TARDIS there the night before and checked out every book in the collection, including the special collections, without explaining to Twilight or Spike why he was doing so (as the Treebrary's destruction was a Fixed Point in Time). He then materialized the TARDIS at the CastleBrary a few days later and turned in all the books.
Also, Applejack, devastated by the destruction of the Treebrary, searched frantically and eventually found a tiny little cutting that still had a spark of life in it. Using a rare display of powerful earth pony magic, she replanted the cutting and nursed it back to life, eventually replanting it in the gardens of the new Castlebrary. Thus the tree still lives, even if it is now little more than a sapling.