The difference between a simple sentence and a complex sentence is the number of clauses they contain. A simple sentence has only one clause, but a complex sentence has more than one clause.
A clause is a portion of a sentence that contains both its own subject and its own verb. Simply having a verb isn't enough. Both subject and verb must be present for it to be a clause.
Let's look at your sentences.
When pigs fly, I will be surprised.
This has two clauses, so it is a complex sentence. In the main clause, there is the subject "I" and the verb "will be surprised." In the subordinate clause, there is the subject "pigs" and the verb "fly."
After this, I will take a shower.
This only has one clause, which means there is only one subject and one verb. The subject is "I," and the verb is "will take." There are no other subjects or verbs. The modifying phrase "after this," contains no verbs.