A compound sentence can be punctuated correctly by joining the two independent clauses with a comma and a coordinating conjunction.
For example: "I wanted to go for a walk, but it started to rain."
So, the correct option is a comma and a coordinating conjunction.