Theory:

A clause is a collection  of words that includes a subject and a verb. (A clause functions as an adjective, an adverb, or a noun.)
Example:
1. When the sun shone, he lurked in the shadows.
(The subject of the first clause is "the Sun" The verb is "shone." The subject of the second clause is "he" The verb is "lurked")

2. Alan stalked a pretty girl, who lived in the neighbouring town. (The subject of the first clause is "Alan" The verb is "stalked" The subject of the second clause is "who" The verb is "lived")
There are two types of clause:
 
 An independent clause:
One that can stand alone as a sentence. An independent clause functions on its own to make a meaningful sentence and looks like a regular sentence. In a sentence, two independent clauses can be connected by the coordinators: and, but, so, or, nor, for, yet.
Example:
1. He is a wise man.
2. I want to buy a phone, but I don’t have enough money.
3. Can you do it?
 A dependent clause:
One that is usually a supporting part of a sentence. It is also called a subordinate clause. Dependent clauses help the independent clauses complete the sentence. A dependent clause alone cannot form a complete sentence.
Example:
1. Even though I made 200 crores, I am still grounded.
(The independent clause could be a standalone sentence, but the dependent clause couldn't.)

2. A computer once beat me at Ludo but was no match for me at boxing.
3. After I die, I'll be forgotten. (Anon)

The opening words of the dependent clauses above ("Even though," "but," and "After") are all subordinating conjunctions. Subordinating conjunctions link a dependent clause to an independent clause.
Clauses can play a variety of roles in sentences. A clause can act as a noun, an adjective, or an adverb.
I) Noun Clauses:
Example:
1. Shirley cannot remember what she said last night.
(The clause acts like a noun.)

2. Now I know why fish eat their young.
(This clause could be replaced with a noun, e.g., "the reason.")
II) Adjective Clauses:
Example:
1. My friend who lives in India looks like Chota Bheem.
(The clause acts like an adjective. It could be replaced with an adjective, e.g., "my India - based friend.")

2. You should never make fun of something that a person can't change about themselves.
(This clause could be replaced with an adjective, e.g., "unchangeable.")
III) Adverbial Clauses:
Example:
1. Harini lost her double chin after she gave up junk food.
(The clause acts like an adverb. It could be replaced with an adverb, e.g., "recently.")

2. I am not afraid of the pen, the knife, or the sword. I will tell the truth wherever I please.
(This clause could be replaced with an adverb, e.g., "there.")