Although most people today think that this is another one of Oscar Wilde's famous quips, the expression was not his orginally. This expression (or modifications of it) got thrown about by several writers and artists who identified with the bohemian spirit of the times (the nineteenth century, more specifically), but actually the ancient Romans had a similar motto of their own: "Ars gratia artis."
Théodore Gautier(1811–1872) popularized the saying by adopting it as a sort of slogan against a trend of thought attributing art a purely didactic role. It was deftly taken up by the Aesthetic Movement, opposing Victorian moralism (and it is at this point that Oscar Wilde comes on the scene). The actual founder of the movement, though, was Walter Pater, who published in 1868 a critical review parallel in thought to another criticism written by a man named Algeron Charles Swinburne.
"Art for Art's sake" represents a belief or ideology that creating a work of art is the ultimate objective of art. It implies that an artists creates a work of art to to satisfy some internal artistic urge, rather than use the work of art to achieve any other purpose, either for the artist or for others. Thus this principle assumes that true artist will create the kind of works only to satisfy his inner urge, not to make money out of it, or give any pleasure or benefit of other kind that make use of the for example, by reading a poem, or looking at a painting.
There are definitely some artists who are so obsessed by their inner urge that they create only what they want to create, without thinking about how they will benefit from it materially. In the process, some of great artists have forced to live under conditions of great poverty and died very poor. This also includes some writers who do not publish their writings. However, this principle is also used by many second grade artists to justify the quality of their work. Some such artists also take great care to gain popularity through crafty gimmicks, to create an impression that they do not care for any worldly gains, or for the reviews of their works by critics.