Answer:
A semicolon is used when both clauses on either side of the punctuation mark are independent. A period could suffice in its place but if the two clauses are directly related to one another, a semicolon is acceptable.
Example: The store was closed; I went to the one next door.
The semicolon indicates a pause longer than a comma.
A semicolon is also used in a lengthy list where commas or other punctuation marks might be included as well.
A comma is used to indicate a short pause between an independent and dependent clause.
Example:
She danced to the music, laughing because she was so happy.
"She danced to the music" is an independent clause and "laughing because she was so happy" is dependent. The latter cannot stand on its own and the comma separates the two clauses.
Commas also mark a series or set of items.
I like shoes, clothes, perfume, movies, and computers.
(In some formats, the last comma is deemed unnecessary.)
-----------------------------
Examples of pauses
One use for commas would be to add something optional to a phrase. You need a subject and a verb for a phrase, but you can add all kinds of things. For example, the phrase "I cried." is perfectly fine on its own, but doesn't give much information. "I cried today." already gives us some precision, but you can further add: "I cried today because my boyfriend dumped me." There are still no commas, but now that you have a decently fleshed-out phrase, you can use them to add: "I cried today, the 13th of March, because my boyfriend dumped me." In this case, they are similar in function to parentheses ( ) because they are adding something that isn't vital to the phrase and doesn't really fit anywhere else. Commas can be used for other things, like enumeration (One, two, three, four and five) or to split up a phrase and make it easier to read, which is why there are rules like putting a comma before every 'but'.
Now, using the same example, but with a semi-colon, you could have: "I cried today, the 13th of March; my boyfriend dumped me." Note the lack of a second comma and the word 'because'. The semi-colon links the two ideas together, rather than because. Think of it as tacking on another phrase to the end of your existing phrase. Semi-colons can almost always be replaced by a period: "I cried today. My boyfriend dumped me. He's such a meanie. I don't know why I ever went out with him." While grammatically correct, this use of periods makes the flow very stiff and clipped, so people often group the phrases together, either with words or punctuation, like so: "I cried today because my boyfriend dumped, but I really don't know why I went out with him in the first place; he was always mean to me."
It is difficult to know exactly when to use the semi-colon (which is why I have heard so many teachers say it's just safer to use a period and split up your ideas a little more). But sometimes the semi-colon is just a better choice.