In the majority of modern democracies power is divided among three branches of government: executive, legislative and judicial. This is done to provide for the existence of checks and balances so that none of government parts is unlimited and becomes totalitarian and harms democracy. These checks and balances allow the staple element of democracy, "rule of law" (i.e. everyone is totally equal before the law) to function and provide equality and right protection for usual citizens.
British Parliament is the legislative branch of government. It is made up of two parts - elected House of Commons and partly elected House of Lords - which limit the power of each other and are there to provide for the best expertise of any legislation going through. Any Bill passed by the Parliament gains legitimate power only when the Queen approves it, however, nowadays it's more of a formal ceremony rather than a proper check. Judiciary is often considered the most efficient check on the Parliament, because any MP can be called to the court to respond for his actions.
The executive branch is made up of the government machine itself, starting with the prime minister and his office and down to the local branches of government such as city majors. They are the ones responsible for implementing the Bills produced by the Parliament. Their actions are mainly limited by the judiciary and publicity.
Judiciary is the last branch of power in the UK and it is made up of the court system with the Supreme Court on top. Its members have a great power because they are the ones who decide what the law actually implies in any given case. The power of judges in the UK is even higher because UK does not have a written constitution and therefore there is no supreme set of laws collected in one place to be available for the citizens. Due to this enormous power judiciary has a large amount of checks and balances. Firstly, the court system intself allows any case to be considered by a more supreme court every time if the court decision was considered unfair. Secondly, judges are appointed and approved by the experts outside judiciary, who are theoretically unlikely to be prejudiced during the appointment process.