A compound sentence is a combination of two or more main or primary clauses. It may or may not have sub-ordinate clauses.
In other words, a compound sentence consists of two or more independent sentences joined together by a coordinating conjunction.
He is poor yet he is happy.
The above sentence consists of two parts:
1) He is poor.
2) He is happy.
These two are joined by coordinating conjunction ‘yet’. In the above example each part consists its own subject and predicate i.e each part is called a clause.
Each clause makes good sense by itself, and hence can stand independent of each other.
1) You may either stay in the hotel or stay with your relatives.
2) The flowers were blooming, the birds were singing and the spring was in the air.