The semicolon gets used in two very different ways. The one thing you can say that describes both ways the semicolon is used is that in both cases the semicolon stands in for another punctuation mark. The semicolon replaces a period (or a conjunction) between two independent clauses when they are closely related. It also serves as a stand-in for a comma in instances when a comma or commas have already been used for another purpose in a sentence.
If one punctuation mark had to go, I’d say make it the semicolon. To begin with, the semicolon is a messy bit of typography; it’s a comma – a sloppy, slashy graphic at best – topped by a dot. Like the period, the comma, the colon, and the dash; the semicolon marks a break or a pause in the flow of a sentence. For this reason they are all called stops. A semicolon, in this role, is a stop. But it its other roles, it’s just a pause – a sort of high-octane comma that gets called into action when we need to signal a pause that is senior to the pause signaled by the lowly comma already present in the sentence.
In the case of the period, the break is terminal, marking the end of a sentence. But sometimes a period just seems too terminal, too final. The writer has the feeling that even though the sentence has ended (syntactically), (semantically) there is still another sentence that would add just the right amount of further information to make the idea whole and provide a truly satisfying conclusion to the train of thought.
Ordinarily a writer would join two closely related sentences (each an independent clause) with a conjunction such as and, or, nor, but, for, or yet. But here’s where you could also use a semicolon: to join two complete sentences that are so closely associated that it seems a shame to break them up with periods, yet they seem to deserve enough independent dignity not to be strung together by a conjunction.
Still, in every case, you might have stuck with two fully formed and finished sentences, each concluded with a period. This is why the semicolon is expendable. Prose would get on fine without it. See? I could have dropped in a colon: This is why the semicolon is expendable: Prose would get on fine without it. (Notice that the first word of the independent clause that follows the semicolon is capitalized. This is a convention that is not universally observed historically or at present depending on which authority or publishing house is consulted.)
Or, I might have recast the idea thus, using a semicolon: The semicolon is expendable; prose would get on fine without it. (In this case the first word of the second independent clause is not capitalized.)
So, period, colon, semicolon; they are all stops. But each stops the action (the velocity of the unfolding sentence) in a different way. The period terminates. The colon signals a recursion – a telescoping of one idea out of another. The semicolon simply declare one sentence the kissing cousin of the other, thus technically rendering them both independent clauses, yoked by a semicolon, in a single sentence.
The other place you will use a semicolon is you need it to stand in for a comma when you already have used a comma for one purpose and now you need another comma for another purpose. Some way is needed to distinguish the use of the same punctuation mark in two different ways in a single sentence. Keep the commas in the narrower, finer grained roles, and use semicolons instead of commas for broader, more generalized purposes.