Different parts of a sentence are called clauses and they are separated by commas.

For example:

I like apples, especially if they are sweet.

I like apples - this is the main cause because it makes sense on its own.

especially if they are sweet - this is the subordinate clause because it does not make sense on its own.

A comma is used to separate the main clause in a sentence from the subordinate clause. The main clause is not always at the beginning of the sentence. Sometimes (but not always), you can swap the clauses around and still have a sentence that makes sense.