Writing Compound Sentences

A simple sentence tells one complete thought.
Maria has a fish.
She wanted a cat.
A compound sentence joins two simple sentences with and, but, or or.
Maria has a fish, but she wanted a cat.
A comma comes before and, but, or or in a compound sentence.
She tried to say cat, and catfish came out.
(The comma signals that a new idea is coming.)