Let’s start off with knowing what a conjunction actually is. A conjunction is a word that connects two complete sentences together. The typical conjunctions most people are familiar with are ‘and’, ‘but’, and ‘or’. These are the ones you’ll see most often connecting two sentences. It will connect sentences like:
He ran across the yard.
John pulled on the door.
These are two independent sentences that can stand on their own. Yet, they can be part of the same scenario. When that is the case, you can use a conjunction to pull them together and paint them happening at the same time in your brain.
He ran across the yard, and John pulled on the door.
The one person ran across the yard while John pulled the door open. You can see the action taking place in a fluid motion. Also, if you put the sentences side by side in a paragraph, they almost sound too juvenile. Combining them with a conjunction helps them mature a little bit.
Now the comma part of all this…
As these are two separate sentences that can stand alone, you need a comma to tell you that. What is the purpose of a comma? It is a reading directional. As you are reading, it tells you where to pause and where deviations occur. Here, it is telling you this is not a single sentence by itself. It is two separate sentences combined for better reading.
The conjunctions used depend on what you are trying to say with the combined sentence. ‘And’ means in addition to. He ran while John was pulling. Both are happening which means ‘and’ is the better fit. What if I used ‘but’? That would convey something entirely different.
He ran across the yard, but John pulled on the door.
This conveys a hint that they could have done the same thing. Maybe something is after them and one guy decides to make a run for it while the other one attempts to get inside a house. Instead of working together, they appear to make different decisions which is important to the story.
The comma is placed before the conjunction to let you know that you need to pause. When you do, you take notice of the conjunction. You notice whether it is an ‘and’ or a ‘but’. Your mind then processes that and interprets the scene based on that and the context it is found it. The picture in your mind adapts to the comma and conjunction.