Throughout the late 19th Century, many nations took advantage and attacked China. Many European powers had a foothold on China. The foothold, or sphere of influence, was an area in which the foreign nation controlled trade and investment.
When the British refused to stop trading opium with China, that's what started the clash between the British and the Chinese in 1839 was called the Opium War. The battles mainly took place at sea. But China's ships were no match for Britain's steam powered gunboats. China lost and was greatly humiliated.
In 1842, they signed a peace treaty, the Treaty of Nanjing. This treaty gave Britain the island of Hong Kong.
Video on Imperialism in East Asia-
http://youtu.be/nxmWfbXS4Pw