Public law is a set of legal principles which govern the manner in which public authorities exercise their power. Government departments (e.g. the UK Border Agency, local authorities, police and prisons) are all public bodies. Some organisations, whilst not government departments can still be public bodies if their function is to provide or discharge a public function (e.g. a private company running an Immigration Detention Centre).
Where a public body such as the Home Office makes a decision that affects an individual, if that decision is made on a wrong understanding of the law or facts or is made through a process that is unfair or biased; then the person affected by that decision can take action to challenge that decision in a variety of ways.