China hates North Korea as much as everyone else. They support them because they're a convenient tool for Chinese diplomacy with the US; every so often the DPRK goes nuts and threatens to blow up South Korea, and the US gets all riled up because we've never officially stopped being at war with them (just a 60 year cease fire). Then China gets to step in and provide the peaceful solution and portrays Washington as a bunch of warmongering fools bullying smaller nations. This is just another iteration of the same tired old game going on the Northeast Pacific.
That's overly simplistic and as such maybe as much wrong as right. China is stuck with North Korea because of the shared border. The Russian Republic, which also shares a border with North Korea and also assisted it somewhat covertly during the Korean War, stopped sending financial support early in Yeltsin's presidency, leaving China fully responsible in this game of musical chairs. China doesn't like the fact that North Korea has nuclear weapons for a variety of reasons. But the truth is that China fears a united pro-US Korea even more, so they grudgingly but willingly pay to prop up the regime. North Korea does actually have a lot of rare earths and China is currently using it's financial support as leverage to extract these materials at cut rate prices, so there is some financial incentive for China to continue to support the regime. China really doesn't provide much useful in the ongoing war of words between North Korea and its perpetual enemies of the US, South Korea, and Japan. China doesn't have as much leverage as those 3 think, but again China rarely uses any leverage at all because it wants North Korea to survive and is afraid if it pushes too hard, North Korea will collapse and the border region will be flooded with refugees. Keep in mind that while North Korea does often infuriate China and at some level at the top they do think that eventually the North Korean regime will collapse on its own, they want to push that date out as far as possible. China paid a very dear price to support their "brothers" in North Korea in the war. China is estimated on the low end to have had at least 100,000 of their soldiers killed in action in the war. One of Mao's sons was killed, probably deliberately, by a UN bombing raid while he was serving in the war. And Taiwan was lost, perhaps permanently, as a direct result of China not having the resources to invade them and the US finally seeing some value in propping up Chiang Kai Shek and sending enough of a deterrent force to the area to save Taiwan. So China feels stuck to support North Korea if for no other reason than to justify the very high price already paid.