A complex sentence has two parts: a main clause that can stand on its own, and a subordinate clause (Nebensatz) that cannot stand alone because it begins with a connector like weil, dass, wenn, or ob. You need this sentence type constantly — to explain a reason (why are you learning German?), to report what you know or think (I know that...), to talk about a condition or time (if/when), or to ask an indirect question (I'm asking whether...).
The golden rule to memorize: in any subordinate clause introduced by one of these connectors, the conjugated verb moves all the way to the end of the clause, instead of staying in second position as in the simple sentences you learned in A1. Compare: Ich arbeite as an independent sentence, but weil ich arbeite... — here arbeite has moved to the end because the clause is now subordinate: Ich lerne Deutsch, weil ich in Deutschland arbeite.
This rule applies to every subordinating connector without exception: weil, dass, wenn, ob, obwohl, damit, bevor, nachdem, als. Whenever you see one of these words, expect the verb to land at the end of that clause.
A second important point: if the whole sentence starts with the subordinate part instead of ending with it, the main verb comes immediately after the comma, followed by the subject: Weil es regnet, bleibe ich zu Hause (notice bleibe comes right after the comma, then ich). That's because the entire subordinate clause counts as "the first idea" of the sentence, and the main verb must still logically occupy second position.
Some connectors deserve extra attention because their meanings can overlap in translation: wenn means "if" or "when" for a repeated or future event, while als means "when" only for a single event that happened once in the past — learners often confuse the two because their own language may use a single word for both. Ob corresponds to "whether/if" in an indirect question with no question mark: Ich frage, ob er kommt.
Finally, weil and denn both mean "because" but behave completely differently: weil sends the verb to the end and is the more standard, widely used connector, while denn leaves normal word order untouched, as if linking two independent clauses. The most common mistake is forgetting to move the verb to the end after weil, producing errors like weil ich bin müde instead of the correct weil ich müde bin. Practice this rule until it becomes automatic.