In the early nineteenth century, before the passing of the 1832 Reform Act, some parliamentary seats had been established many centuries before by Royal Charter. These were known as Rotten Boroughs or Pocket Boroughs. In a rapidly changing society, not least due to the effects of the Industrial Revolution, these often rural constituencies had a vastly depleted population and the sitting MP was often returned unopposed, with the help of a wealthy and influential patron. Naturally, this led to Parliament becoming increasingly unrepresentative of the national demographic. The word "Rotten" meant exactly what it sounds like - corruption was rife.

The Reform Act came into effect under the Whig (the predecessors of the Liberal Party) Prime Minister Earl Grey, leading to a fairer and more representative distribution of the vote. Further reform was enacted by the Ballot Act of 1872, which established the secret ballot as the norm.

But there was still a long way to go, with women not receiving the vote until the 20th century, and to this very day, the First Past the Post system means there are more so-called "safe seats" than may be considered healthy.

More Info: en.wikipedia.org