First of all, you need to know what a compound and a complex sentence is. A compound sentence (as in your example), is a sentence that contains at least two independent clauses. In your example, there are two independent clauses: 1. Harry drew near the fire + AND + 2. he nearly singed his jacket. A complex sentence contains one independent clause and at least one dependent clause. So we just need to make one of these independent clauses into a dependent one in order to create a complex sentence: When Harry drew near the fire, he nearly singed his jacket.