A compound sentence contains at least two independent clauses. These clauses are joined by a coordinating conjunction or a semicolon. A coordinating conjunction is a word that glues words, phrases, or clauses together.
Here's a sentence diagram of a compound sentence. Note that there are now two horizontal lines and one is directly below the other.
I kicked the ball is an independent clause. It hit Tom is also an independent clause. And is a coordinating conjunction joining the two independent clauses. I kicked the ball, and it hit Tom is a compound sentence. Learn more about the compound sentence here.
Psst! When you join two independent clauses with only a comma, it's called a comma splice. Avoid comma splices.