A compound sentence contains two independent clauses.
"He stopped, but he did not look."
"It was cold that morning and everybody had turn their heaters up."
"He left the company, but he still has many friends there."
A complex sentence contains one independent clause and at least one dependent clause:
"He started working soon after he arrived."
"After he graduated, he went on to work in Germany."