A compund sentance is a sentence that could be made into two simple sentences: "I am happy and I am going to smile" > "I am happy. I am going to smile".
A complex sentance can't be broken so easily: "I am so happy that I am smiling, a characteristic of happiness".