The first thing you should know about "The King in Yellow" is that it is not a person, nor any single thing, and whatever it names is different depending on the specific context of its usage. The moniker itself originated with Robert W. Chambers' collection of the same name, but "Hastur," the name most closely associated with this title, arose from an entirely seperate origin. Chambers stumbled upon it via a story by Ambrose Bierce, Haïta the Shepherd, wherein Hastur is the God of shepherds threatened by Haïta with the prospect of losing his worship, and in exhchange Hastur protects the valley from a flood. Throughout this ordeal, he encounters a woman that he believes to be Death, only for an old hermit to inform him after the fact that she was Happiness. Although the reference to shepherds is largely abadoned over time, Hastur and their title would retain this same tension between Death and Happiness.
Robert W. Chambers' book, which deserves a few accolades for its contributions to modern horror, is more than a small challange to describe in detail within limited space. The many different stories within the book cover horror, science fiction, and mystery, all the main staples of "weird fiction," with only the cursed play "The King in Yellow" acting as a thread between them. Its plot is never described in full detail, due to its strange memetic properties, but the first act is said to be largely innocuous, lulling the audience into a false sense of security before the King in Yellow arrives and manifests orgiastic madness. Chambers is quite adept at maintaining an enticing ambiguity to the subtextual work, never definitively stating a clear origin or author behind it, and only revealing three roles: Camilla, Cassilda, and The Stranger. The actual character of the King is totally unknown, even the name "Hastur" is given to the city wherein the play is set, not to the actual entity. What is clear, however, is that viewing or reading the play through its entirety has a strange effect on everyone, though the specific behavior is rather sporadic, and many of the strange events in the individual plots are heavily implied to be the direct result of its influence. This is not the first instance of a "mimetic horror," Charlotte Perkins Gilman's The Yellow Wallpaper had come out three years before, but the implications that the text might distort reality itself has left an appros mark on the genre.
H.P. Lovecraft did cite "The King in Yellow" as one of his influnces, which is clear in many themes of his work, but he only ever referenced the entity in a single story. Hastur is referenced among a great assortment of different elder gods in the novella The Wisperer in Darkness. This being was formally associated with the moniker of "The King in Yellow" only in the works inspired by Lovecraft that make up the Cthulhu Mythos. John Tynes, writer and contributor to the table top RPG Call of Cthulhu, even went as far to suggest an entire "Hastur mythos" in order to provide a different interpretation of the character that's still in line with the source material. For him, Hastur is more a metaphysical embodiment of entropy than an actual diety, lacking any personality or intelligence beyond what people project onto them. The King in Yellow, then, is a particular version of Hastur that represents the specific entropic force of humanity that hollows out the world and eachother.
What's my take on all this? Well, I'm gonna borrow a bit from Spinoza here and say that The King in Yellow is only "entropy" because of our efforts to anthropomorthize them, not in spite of it. Hastur has largely been divorced from their role as the God of shephards, likely because that doesn't seem nearly scary nor profound enough, but that only belies a lack of imagination. They are not just a shephard of a single flock, they are a universal shephard, forever herding all of existence towards unknown and incomprehensible ends. This may then couple with the idea of "entropy," as the dissolution and decay of all things eventually reforms them into something new. For me, this interpretation is far more effective than just the idea of The King in Yellow as some shadowy force associated with a vague negative concept. Instead, Hastur now represents a positive philosophy the genuinely appeals to many real people, which makes the absolute terror of their arrival all the more dreadful.