Which is a complex sentence?

 - Freedom of speech and trial by jury are two important rights in the United States Constitution.
 - When the submarine surfaced, a crowd of people on the shore gathered and stared at the rare sight.
The first sentence is the complex sentence. It is made up of an independent clause and a dependent clause. The dependent clause begins with the subordinating conjunction when.
When the submarine surfaced, a crowd of people on the shore gathered and stared at the rare sight.