Before the British started to colonise the area, the huge Indian subcontinent contained a number of different regions with various political structures, but with many cultural and religious similarities between them.
The first significant colonial efforts were led by the British East India Company, a powerful organisation of merchants which at its peak controlled roughly half of global trade. The Company's early interest in India was mostly related to trade, but eventually they started to seize direct control of various regions, using either military force or clever political manipulation of local rulers.
The Company suffered a major setback during the Indian Rebellion of 1857, when a number of Indian-born members of the Company's army - the so-called sepoys - rebelled against their masters. Though the Rebellion was eventually defeated by the British, the government of India was reformed to make the country directly ruled by the British crown, instead of by the Company. This era was known as the British Raj.
You can read much more about colonial times in India on the following pages.