When two independent clauses are joined by a co-ordinating conjunction (e.g. and, but, or, so), there must be a comma before the conjunction, or it will be a run-on sentence. Independent clauses are complete sentences; if you could put a period after the clause but have instead used just a conjunction, then you’ve created a run-on sentence.
Matthew went to the library, and I headed back to the science lab.
The wind was brisk, but the sun was strong.
The man’s business was failing, so he was searching for alternative income.
Anna went to make a strong cup of coffee, for she was falling asleep at her desk.
The paintings were striking, yet they were also pleasant to look at.