A semicolon connects two independent clauses when the second clause is not introduced by a conjunction (conjunctions are words like and, or, nor, but, and so on).
(1) Some people like to work early in the morning; others prefer to work late at night.
(2) We have an old cottage house in Provence; we also have a small apartment in Paris.
It is also correct to use a full stop (.) in the examples above.
(3) Some people like to work early in the morning. Others prefer to work late at night.
Semicolons can be used instead of commas to avoid confusion in sentences whose structure is obscured by too many commas.
(4) Many people go to work by car, bus, or cab; but there is a substantial group of enthusiasts who, for some reason, choose to bike, run, or ski.
There must be a comma before the conjunction but, which introduces an independent clause (see Rule 3 in [Rules for comma usage]). However, the presence of six other commas in the sentence justifies the use of a semicolon to separate the two clauses and make the sentence structrure more transparent.
Similarly, one can use a semicolon to separate items in a list if the items themselves contain commas or are very long.
(5) The tasks of PhD students include teaching students, both at the BA level and at the MA level; attending PhD courses, offered by the University on an annual basis; writing two research papers; and completing a dissertation, preferably before the end of the PhD period.
A common mistake is to use a comma where a semicolon is needed.
(6) Some people like to work early in the morning, others prefer to work late at night. [incorrect]
The correct punctuation mark in (6) is semicolon, since the second clause is not introduced by a conjunction.