A complex sentence is composed of one dependent clause and one independent clause.
Here's an example: When I went to the gym, I had a great time.
"When I went to the gym" is the dependent clause as it cannot be a complete sentence on its own, and "I had a great time" is the independent clause as it can stand alone. I hope this helps!