A Phrase: A phrase does not contain either a subject (who or what the sentence is about) or verb (information about the subject) and, consequently, cannot convey a complete thought. A phrase contrasts with a clause. A clause contains both a subject and verb, and it can convey a complete idea.
An independent (or main) clause expresses a complete thought and can stand by itself as a sentence.
I went to the movies.
A dependent (or subordinate) clause does not express a complete thought and cannot stand alone as a sentence.
after I finished studying
Simple - one independant clause
Matthew took his umbrella.
We ate and slept in the same room. Compound Subject
The teacher spoke kindly but firmly. Compound Verb
Compound - two or more independant clauses joined together.
The thunder rolled; the lightening tore across the sky.
They rang the doorbell, but no one answered.
John has poor eyesight; therefore, the optometrist prescribed glasses.
Complex - independant and dependant clauses joined together.
We took the wrong turn when we reached the place where the road divided.
If you buy a camera, do not choose one that is very complicated.
If the dependent clause comes first, you need a comma. You don't need a comma if it comes after the independent clause.
Compound-Complex
Although he had many possessions, they did not satisfy him, and he longed for the happiness that others had.