History
Following his appointment as Headmaster of Hogwarts in 1956, a portrait of Albus Dumbledore was painted and placed in the Headmaster portraits' cupboard where the good Professor would visit it on occassions and teach it to talk and behave like himself. Following his untimely demise, however, the portrait was found hanging behind the chair of the Headmaster's desk, with its occupant asleep. It is not a completely accurate copy of Dumbledore, however, only what Hogwarts knew of him over the years.
During Severus Snape's tenure as Headmaster, the portrait helped and advised the formerly and presumed now again Death Eater, appointed Headmaster, in aiding Harry Potter and his friends destroy Lord Voldemort's Horcruxes. This included, but was not limited to telling Snape that he must give Godric Gryffindor's Sword, which was at the time concealed in a cavity behind the portrait, to Harry, though he did not tell him why.
After the death of the Dark Lord and the defeat and scattering of his forces, Harry Potter and his friends made their way to the Headmaster's office, and received tumultuous applause from the other Headmasters. Here, Harry had a brief discussion with the portrait about his plans for the Elder Wand, and his decision to leave the Resurrection Stone lost.
As Severus Snape's portrait was later hung, it can be assumed that Dumbledore's portrait was later moved down the line to make way for Snape's portrait to hang behind the desk.