Hong Kong has historically been a colony separate from China. Most recently, it was part of the British Empire, and is historically known as a sphere of influence. As such, it operated under a different set of rules from mainland china, essentially being a different country within china. The official name for this unique political arrangement is
"One country, two systems."
Hong Kong is going through a transition period where it is returning to control of China. Officially, china holds sovereignty over Hong Kong already, but has pledged to a transitional period where they are still granted a degree of autonomy, especially regarding jurisdiction. Recently, China's government has begun making moves towards stripping hong kong of autonomy, the most publicized example being an extradition bill where people can be forced to stand trial in mainland china instead of hong kong. But there are generally 10 demands that protestors have.