What is the relation between a contraction and a recession?
There is really very little technical difference between these two things. The term recession is perhaps a bit more of a "popular" term while the term "contraction" is more of a technical term used in academic writing. Also, the term contraction does not imply any specific amount of time while the term "recession" does.
In both cases, the basic meaning of the word is that the economy is in decline. We say that an economy is in recession when the economy's real gross domestic product has been declining for two straight quarters. We can also say that this is a period of contraction (because the economy is getting smaller).