The Muslim Mughal Empire was centered in India from 1526 to 1761. Early in the eighteenth century, though, the empire was attacked in a series of bloody invasions by Nadir Shah and other Iranians and, later, Afghans. Throughout the 1760s, when the throne at Delhi was unoccupied, the empire's power diminished and its leadership became increasingly chaotic.
In the chaos, of the various European colonial powers with a stake in India -- Portugal, Holland, France, Italy, England -- the British emerged as the most powerful. The East India Company, a group of London merchants with a royal monopoly to conduct Indian trade since 1600, managed through a number of alliances with regional Indian rulers (and manipulation of Indian politics) to gain effective control of the subcontinent -- a control cemented in the 1750s and '60s by British military superiority over the native Indians.
The new British colonial rulers of India earned tremendous amounts of money in their new offices, becoming nabobs partly through the high volume of trade with the mother country, but also through ubiquitous bribery, which was typical of the corruption of the colonial administration. The most famous, or infamous, of the early British administrators was Warren Hastings, who assumed control of the East India Company's possessions in 1774. He was impeached on his retirement and return to England, with Edmund Burke leading the charge, but Hastings was acquitted.
Around the turn of the century (and partly in response to Napoleon's eastern campagins), British policy shifted toward complete and unambiguous control of India. By 1818, British domination was nearly complete: the settlement of 1818 gave the East India Company control of India until 1947.