It's to provide a sort of system of checks and balances for the House of Commons, which contains the elected MPs.
Though the House of Lords used to just be for "lords", it's now designed to be a house full of people who are considered experts, or worthy - i.e., intelligent people with good life, business, scientific, philosophical experience etc who can check the laws the government would like to make, and ensure that they are good and sound. In theory it is supposed to be neutral and separate from the government, though like anybody, the people who make up the House of Lords will have their own political opinions and support one party or another.
The debate that's been knocking around for a long while is whether it should be another elected chamber. The slight issue is that if a government is in power for long enough, it can start to push its supporters into the House of Lords.
The idea is that if the government in power decided to pass a really drastic law, such as one that got read of the welfare state, the House of Lords could refuse to pass it.