D-dimer  is one of the protein fragments produced when a blood clot gets dissolved in the body. It is normally undetectable or detectable at a very low level unless the body is forming and breaking down blood clots. Then, its level in the blood can significantly rise.
Blood clotting is an important process that prevents you from losing too much blood when you are injured. Normally, your body will dissolve the clot once your injury has healed. With a  blood clotting disorder, clots can form when you don't have an obvious injury or don't dissolve when they should. These conditions can be very serious and even life-threatening. A D-dimer test can show if you have one of these conditions.
A D-dimer test is most often used to find out whether you have a blood clotting disorder. These disorders include:
In Covid-19 patients, where the virus affects the lung and in the process there is a series of cascading immunological response called as "Cytokine Storm", there is inflammation in the pulmonary tissue which can cause internal bleeding and clotting. The clotting process releases D-Dimer which can be detected through the test and that can give an indication about the extent of the infection also help the clinician the further treatment regime.