An Earl is a member of the British peerage ranking below a Marquess and above a Viscount. The Earl is the British equivalent of the continental Count. The wife of an Earl is a Countess. The eldest son of an Earl generally has the courtesy title of Viscount or Lord, younger sons are known as the Honourable [Firstname] [Lastname] and daughters are known as Lady [Firstname] [Lastname] (the most obvious example being Lady Diana Spencer).
The word derives from Middle English "erl" meaning warrior, nobleman, equivalent to the jarl in Old Norse. It's unclear whether there exists connection by etymology to the Anglo-Saxon term "Ealdorman" which translates literally as "Elder", "Senior", and refers to a chief counselor of the realm. That term survives in modern English as "Alderman", a councilman or representative in local government or a local church governing body.
Earls were originally essentially a royal governor. The English kings found it dangerous to give this additional power to an already powerful aristocrat, and so gradually this role was assumed by the sheriffs. The details of this transition are hard to pin down, since earls in more peripheral areas (the Scottish and Welsh marches, and Cornwall) retained some viceregal powers long after other earls had lost them. The loosening of central authority during the Anarchy also complicates any smooth description of the changeover.
A loose connection between earls and shires remained for a long time after authority had moved over to the sheriffs. An official defining characteristic of an earl was the receipt of the "third penny" of the revenues of justice of a shire. Thus every earl was associated with some shire, and very often a new creation would be made in favor of the county where the new earl already had large estates and local influence.
Also, due to the this association of earls and shires, the medieval practice was somewhat loose regarding the precise name used: no confusion could arise by calling someone earl of a shire, earl of the county town of the shire, or earl of some other prominent place in the shire; these were all synomynous. Thus, we have the "earl of Shrewsbury" (Shropshire), "earl of Arundel" or "earl of Cichester" (Sussex), "earl of Winchester" (Hampshire), etc. In a few cases the earl was traditionally addressed by his family name, e.g. the "earl Warenne" (in this case the practice may have arisen because these earls had little or no property in Surrey, their official county).
As this last case illustrates, it was not always true that an earl had an intimate assocation with "his" county. Another example is the earls of Oxford, whose property was largely in Essex. They became earls of Oxford because there already were earls of Essex and of the other nearby shires.
Eventually the connection between an earl and a shire was lost, so that in the present day there are a number of earldoms named for towns, mountains, or simply last names. Nevertheless, some consider the earldoms named for counties (or county towns) to be more prestigeous.