Common law is the general
unwritten law of the land. Being general, it is opposed to law in special domains such as the navy or the church. Being unwritten, it is opposed to
written law passed by kings or
legislatures. And being for all the land, it is opposed to
local laws and customs, whether ancient rights or modern municipal ordinances.
Common law in this sense is the unique creation of England, developing throughout the Middle Ages and surviving into modern times, and forming the bedrock of the legal systems of all countries that have inherited from the English system. That's more or less everywhere in the Commonwealth and the United States, apart from Scotland, Louisiana, and Quebec, which use some form of the civil law prevalent on the European continent: this developed at the same time as common law, but was derived from the ancient codifications of Roman law. In England, Roman law had a relatively small impact.
One of the conditions of the Act of Union between England and Scotland in 1707 was that Scotland should continue to use its own system of Roman (or Roman-Dutch) law, so the English and Scottish legal systems continue to be very different. Laws passed by the United Kingdom parliament in Westminster sometimes apply to the whole of the UK, but are often phrased to apply to 'England and Wales'.
In saying common law is unwritten, that is not to say there is no writing about it. Judges preserve and interpret the authority of common law by reference to the vast amount of precedent contained in records of past cases. Common law is organic and continues to develop, because there are always new situations arising in which precedent does not have all the answers.
These days almost all new law is statute law, that is written laws passed by our various parliaments at national, state, provincial, and European level, and which may implicitly or explicitly override the common law. All overseas settlements founded from England began to develop their own statute law from the date of settlement, and indeed their own common law, since there is no necessity for a judgement made in England in 1850 or 1950 to apply to an ex-colony whose legal system separated long before that.
History
There is an older sense of 'common law', marked by the OED as obsolete, and equivalent to the Latin jus commune and French droit commun, where 'common' has its usual meaning of 'general, widespread'. In this sense other countries, such as France or Germany, could be said to have common law, as opposed to the local law of their cities and principalities, and the restricted law of their guilds and orders. This was the original sense in England too, as after 1066 the Normans began to impose a nationwide legal system over the local dooms and customs of Anglo-Saxon England.
In the Saxon system even serious crimes were personal matters, with compensation required for injuries, such as having your son or servant murdered or maimed, and the church taking an interest in looking after the soul of the wrongdoer. For example, the third article of The Laws of King Edmund I, relating to homicide, says only If any one shed a Christian man's blood, let him not come into the king's presence, ere he go to penance, as the bishop may teach him, and his confessor direct him.
Many of the laws passed by Anglo-Saxon kings, if they were indeed passed rather than merely written down to codify existing practice, concerned themselves with settling the amounts payable in compensation. This no doubt was intended to tamp down the escalation of blood feuds, well-known to us from Old English and Norse literature. For a fuller survey of law before the Normans, see heyoka's nodes tabulated under Anglo-Saxon Laws and Customs.
The Normans made crime a public matter, and the King's authority became more heavily involved in adjudicating. His officials evolved over the next few centuries into professional judges and barristers, and judges from the King's Court (the Curia Regis) in London toured the country gradually imposing a common law over existing local customary law. After the Conquest, England was never fragmented into the autonomous duchies, principalities, and city-states that covered France, Germany, and Italy.
They also restricted the church to the administration of ecclesiastical law. Literate clergy were however used in the administration of secular law: whence the use of the word 'clerk' (cleric) as a scribe or recorder. The extensive recording of legal proceedings in writing contributed to the development of both common law and statute law. The switch to the use of English made the law more accessible.
The Normans introduced the writ, a written instruction to a party in a case to appear at a trial. The parties then entered their pleadings in writing, and the process was concluded by a verdict and a judgement. These records of individual cases were collected into plea rolls, which existed in a fairly complete state from the reign of Richard I (1189-1199). In fact the phrase 'from time immemorial' has a precise legal meaning: it means that the usage or right claimed has existed from before 1189. Under Henry III, the jurist Henry de Bracton used the plea rolls to create a voluminous compilation of the common law.
During the reigns of Henry III (1216-1272) and Edward I (1272-1307) statute law flourished. These two kings were great lawgivers. At first their laws were, as before, written confirmations of existing practices, but gradually they extended their powers to introduced new laws, or statutes. Thus statute law branched off from common law, which was itself a relatively recent imposition over customary law. The English language was used from the reign of Edward III.
In 1215 Henry's father King John approved the Magna Carta. In 1265 the first Parliament sat. In 1275 the first Statute of Westminster was passed, which made trial by jury compulsory. Archaic usages like trial by ordeal fell out of use. In 1290 the statute Quia Emptores was passed, restricting to the Crown the power to create new feudal rights. The old feudal system, with loyalty to individual lords, was on its way out. Meanwhile, on the Continent, Roman law was being reintroduced to replace feudal law: the Normans largely resisted this.
The King's single court gradually became various courts, some of them with special purposes. The High Court of Chancery from the 1400s concerned itself with equity or conscience, taking petitions and appeals to correct injustices and inadequacies in the application of the law, and to grant relief where decisions had been made wrongly because of factors such as fraud or breach of confidence.
English history was one long contest between rival powers for the making of laws. With the help of a few civil wars and executions, power passed slowly from Crown to Parliament and judiciary. The Star Chamber was set up, proved to be an abuser of liberties, and was abolished. One of the most important figures in later years was Sir Edward Coke (1552-1634), who was Speaker of the House of Commons in 1593, attorney general 1594, chief justice of the Common Pleas 1606, and chief justice of the King's Bench from 1613 to 1616. He defended the common law against the King's power, and wrote his Reports and Institutes, recording and explaining the common law. This established the common law once more as the central plank of the law of England, against the authority of the Crown, and against Roman law. In 1610 he had judged it illegal for laws to be made merely by Crown proclamation.
English colonies administered their law with what they knew of English law, but developed independently from the start. Massachusetts published a large volume of its own laws in 1648, and Pennsylvania did so in 1682. In contrast, in 1701 Rhode Island explicitly adopted the whole of current English law.
The third great individual in codifying common law, after de Bracton and Coke, was Sir William Blackstone (1723-1780), who published his Commentaries on the Laws of England in the 1760s, which he had delivered as lectures at Oxford: the first time English law had been taught at an English university. The Commentaries were a comprehensive explanation of the state of common law. An American edition published in 1771 was highly influential there.
In the nineteenth century in Britain there was a great deal of reform, with a huge amount of mediaeval law repealed or replaced (including such quaint things as practising with longbows, now more urban legend than fact). A lot of things once governed by common law are increasingly governed by statute.
A final note: common law is law, so a common-law marriage is a legal marriage. The expression is sometimes used as if it meant de facto marriage or shacking up together. Common-law marriage was abolished in England in 1753, under Lord Hardwicke's Marriage Act, which required marriages to be performed in a church by a Church of England priest (except for Jews and Quakers); in the early 1800s the possibility of a registry office marriage was added. However, common-law marriage is still legal in some American states, and was legal in Scotland until about 1950, which is why you could race to Gretna Green, the closest place in Scotland, to get a customary marriage by the village blacksmith.
Another: I am not a lawyer.