Carl is using a defense mechanism known as displacement, which is the transfer of an emotion from its original focus to another object, person, or situation.

Why do I need a comma after "displacement"?

http://grammar.ccc.commnet.edu/grammar/commas.htm

Read and study #4 here.

I'm a bit confused. Is there always a comma before "which"? Or does it only applies to some?

The comma after the word "displacement" is needed because you are providing additional information about the defense mechanism. This additional information is known as a nonrestrictive clause, which means that it can be omitted from the sentence without changing the essential meaning. To separate this nonrestrictive clause from the main sentence, a comma is used to indicate a pause in the flow of the sentence. In this case, the nonrestrictive clause is providing more explanation about the specific type of defense mechanism that Carl is using.

In this sentence, you need a comma after "displacement" because you are providing additional information about the defense mechanism known as displacement. The phrase "which is the transfer of an emotion from its original focus to another object, person, or situation" is an example of a non-restrictive relative clause. It adds extra information to the sentence but is not essential to the meaning of the sentence. When a non-restrictive clause is used, it is set apart from the rest of the sentence with commas to indicate that it is not necessary for the overall sentence structure.