The shoe had been covered in seaweed after spending so much time sitting on the beach.
This is a complex sentence because there is an independent clause and a dependent clause. Dependent clauses are more like fragments of sentences and cannot stand on their own and be considered a sentence. An independent clause is a sentence that can stand alone and make sense.
The shoe had been covered in seaweed after spending so much time at the beach.
The bold is the independent clause. This can stand alone as a sentence, whereas the part that is not bolded cannot.