The UK has passed many anti-discrimination laws. The Equality Act 2010 aimed to bring together previous Acts and Regulations, including the Equal Pay Act 1970, the Sex Discrimination Act 1975, the Race Relations Act 1976, the Disability Discrimination Act 1995, the Human Rights Act 1998 and the Equality Act 2006.
It is difficult to police prejudice because it involves opinion, which may not always show itself in ways that are 'against the law'. When opinion is put into action, however, and people are treated unequally, prejudice becomes discrimination, which is easier to identify. Anti-discrimination laws mean that if someone feels they are being discriminated against, they can defend themselves by taking the offender to court.