The British wanted to trade with China in return for exotic goods such as tea, porcelain, and silk. However, The Chinese did not want to interact or trade with other countries as they wanted to avoid revolutions and advancements. The chinese had a mindset of change = decay.
The British were pouring their silver into the trade with China, and they slowly began to run out. This resulted in the British selling Opium in return for more silver.
The Opium sold by the British took great effect on the Chinese society - a majority of China's workers were addicted to the drug and became very lazy.
In order to halt the selling of Opium, China created strict laws and bans. This aggravated the British, and the First Opium War began.
The aftermath of the First Opium War was China opening five more treaty ports. However, this did not satisfy Britain's need for the Chinese goods, and the Second Opium War took place.