Differentiate between independent and dependent clauses. An independent clause is a complete thought, or a complete sentence, that can stand on its own or be linked to other clauses. A sentence containing two independent clauses is called a compound sentence. "Olga went to the library, and she read a newspaper while she was there."
A dependent clause is sometimes called a subordinate clause. It contains a subject and verb, but it is subordinate to an independent clause and can't stand by itself. A sentence with an independent clause and a dependent clause is called a complex sentence. "Josephine went to the library because she wanted to borrow a video."
The dependent, or subordinate, clause -- "because she wanted to borrow a video" -- makes sense only when it is attached to the independent clause. It provides additional information about the independent clause.
Separate the two clauses to see if they both make sense alone. "Freddie went to the post office because he needed stamps." "Freddie went to the post office" is the independent clause that can stand by itself. "Because he needed stamps" is a dependent clause that requires connection to another clause to make sense.
Look for certain words that introduce dependent clauses. The Purdue Online Writing Lab lists such words as "after, although, as, as if, because, before, even if, even though, if, in order to, since, though, unless, until, whatever, when, whenever, whether and while." "When Elmer worked in the restaurant after school hours" is a dependent clause because it is not a complete thought.
If the clauses are connected by the coordinating conjunctions "and, but, for, or, nor, so, and yet," according to the Purdue OWL, they are independent clauses and can stand alone. "Elmer worked in the restaurant after school hours, but he didn't have time to keep up with his studies."
Separate independent clauses with a comma or a semicolon. "Florence went to the store, but she didn't stop at the post office." "Florence went to the store; she didn't stop at the post office." When a dependent clause follows an independent clause, it is not set apart with a comma. "Angie went to the supermarket because she needed milk and cat food." If the dependent clause introduces the independent clause, however, a comma generally follows it. "Because she needed milk and cat food, Angie went to the supermarket."
Depending on whether or not the clause is essential to the meaning of the sentence, it may or may not be set off with commas. "The children were frightened whenever the lightning struck." The clause explains why the children were frightened. "The children, after the storm ended, went outside to play." The dependent clause could be omitted without changing the meaning of the sentence.