These famous words are taken from the opening line to Keats' epic poem "Endymion". The full line is: "A thing of beauty is a joy for ever: Its loveliness increases; it will never pass into nothingness". What Keats means by this is that beauty is eternal; it will never fade. Though human beings may come and go, and certain features of the natural landscape decay and crumble into dust, beauty, in its various forms, will live on forever.
Endymion, the eponymous shepherd boy, lives in a dream-like world in which everything is beautiful. Surrounded on all sides by the beauties of nature, the trees, the "fair musk-rose blooms," the sun and the moon, the young man is entranced by everything that the world has to offer by way of beauty. At the same time, this "brain-sick shepherd-prince" is separated from the natural world by his trance-like, sleepy state. He is kept in this state by the deep love he once had for Cynthia, a woman he thought was a mortal Indian lady, but who in fact turned out to be the Greek goddess Artemis in disguise.
We can see, then, why a thing of beauty is a joy forever. The goddess Artemis, like the love that Endymion has for her, is eternal. Neither she nor her beauty will ever die, nor will Endymion's love.