When English speakers talk about someone being “black and blue” they are usually referring to the condition of being bruised. Bruising is what happens when blood pools under the skin, creating a darker hue on the skin’s surface. These colors most often include different shades of blue and black, as well as brown and gray.
The phrase uses color to create an idiomatic expression. One common form of this expression is when somebody talks about “beating” someone “black and blue,” which means to hit them until they are literally covered in bruises. In a general sense, this phrase is most often used to talk about conflict and violence between individuals, although some people may refer to being “black and blue” from contact with an inanimate object. For example, if man ran into a chair and hurt his leg, he might say “my leg is black and blue,” even if the bruise is really not quite so bad.
Another similar phrase is one that is very common in English. It stems from the idea of hitting one’s head and bruising around the eye. Someone who bruises their face around the eye might say “I have a back eye.” Over time, the term “black eye” has also come to mean anything that causes damage to a person’s reputation.
Opinions differ on the origin of the phrase, but it is generally understood to have developed as a way to describe the colors of the skin after bruising. One corresponding idiom that is much more obscure is the phrase “blue Monday.” It’s important to note here that the use of the word blue to express sadness is very common in English language. In the particular case of “blue Monday,” though, some word historians have claimed that this idiom relates back to a reference to bruising. The idea is that in times past, Monday was a day of the week designated for punishing deserting sailors, where the offenders were brought to a common spot and beaten until they were severely bruised.
The phrase “black and blue” belongs to the somewhat unusual category of medical idioms. Many of these exist in the English language, some of which are phrasal verbs like “catch cold” that refer to particular conditions. A general medical idiom that corresponds to “black and blue” is another one that describes a condition: when people talk about being “under the weather” they are simply referring to being ill in a broad sense. These kinds of "conditional" medical idioms can help express either actual maladies or other more abstract situations.