A compound sentence is two complete thoughts joined together. Usually we use a comma and one of the FANBOYS to join two simple sentences into a compound sentence.
You can also join two simple sentences with a semicolon. The semicolon (;) takes the place of comma, FANBOYS in a compound sentence.
Look at these compound sentences:
It rained on Monday, but Tuesday was sunny.
It rained on Monday; Tuesday was sunny.
The two compound sentences say the exact same thing. The only difference is the way in which the two simple sentences are joined.
Use a comma, FANBOYS or a semicolon to join two simple sentences. Either way, you have made a compound sentence.