When you join two simple sentences with the linking words for, and, nor, but, or, yet or so , you get a compound sentence.
for, and, nor, but, or, yet or so (FANBOYS),
I need to take the test, but I am too sick to go to school.
It was getting late, and we hadn’t had our dinner yet.