A criminal offence in English law, which also endures in the legal systems of a number of Commonwealth countries. It's a fairly broadly defined offence; it can include trying to coerce a judge or jury, obstructing a police investigation, tampering with evidence or witnesses, or really anything done to mess with the court system itself, with the exceptions of bribery, perjury (lying under oath or affirmation), or just straight contempt of court; each of these are defined as separate offences. As you might expect, the courts do not take kindly to interference with their work, and as such perverting the course of justice is a very serious matter. It has to be tried by indictment, before a jury in a Crown Court, and the maximum sentence if convicted is life imprisonment, as well as a possible fine. Of course, screwing with the courts has been long held to be A Bad Thing; as such, perverting the course of justice is an offence arising from the common law, rather than any specific legislation.
Incidentally, I find it a wonderful example of the use of language in English law. An American equivalent might well be the rather prosaic obstruction or witness tampering. But perverting the course of justice? It makes the accused sound like a supervillain. Even better if the defendant is alleged to have got a friend in to help. Then it's the even more Macchiavellian-sounding 'conspiracy to pervert the course of justice'. They may have tried to get as much of the Latin out of law as possible, and to get rid of the wigs and gowns until it's a homogenised, corporate profession, but it's the little things like this that are the last hurrah of the proper, grinding, Dickensian injustice that made my country what it is today.
Of course, Scots Law being what it is, it had to go one better. The equivalent offence in Scotland is 'attempting to defeat the ends of justice', which blows right past supervillain territory and sets up the hearing of some ned who threatened his on-again, off-again girlfriend for going to the police because he'd sent her some unkind messages on Facebook into a Manichean battle between the forces of good and evil themselves. This is a recurring tendency in the legal system of Scotland; it may also bear noting that the rough equivalent of the offence of criminal damage is known in Scotland as 'malicious mischief'. Long may this sort of thing continue.