What is CLUBBING
As a minor definition "is a deformity of the fingers and fingernails that is associated with a number of diseases, mostly of the heart and lungs".

How does it develop?

In five steps: (return to the Image attached)
1. Fluctuation and softening of the nail bed.
2.Loss of the normal <165 angle ("Lovibond angle")between the nail bed and the fold (cuticula).
3.Increased convexity of the nail fold.
4.Thickening of the whole distal finger.
5.Shiny aspect and striation of the nail and skin.

What you will do when clubbing is encountered?

Seek to identify it's cause.
Accomplish it by obtaining a medical history.
Give a particular attention to lung, heart and GI conditions.
Perform a clinical examination. "Schamroth's window test".
X-ray can be also performed.

What is Schamroth's window test?

When the distal phalanges of corresponding digits of opposite hands are directly apposed, fingernail to fingernail, a small diamond-shaped "window" is apparent between the nail beds. If this window is obliterated, the test is positive and clubbing is present.

How does it occur? (PathoPhysiology)

Even though clubbing is a widely recognized symptom of many diseases the physiological mechanism that actually causes clubbing is not well understood. Current understanding is that these diseases cause vasodilation in the distal circulation which leads to hypertrophy of the tissue of the nail beds and thus to the clubbed fingernails.

What diseases clubbing is associated with?

Lung disease:
Lung Cancer.
Interstitial Lung Disease.
Tuberculosis.
Bronchiectasis.
Lung abscess.
Empyema.
Cystic Fibrosis.
Pulmonary Hypertension. (Return to the image attached).
Mesothelioma.
If it was presented in COPD patient, you will have to search for any sign of cancer.

Heart disease:
Chronic Hypoxia.
Congenital Cyanotic Heart Disease.
Subacute bacterial endocarditis.
Atrial Myxoma.

GI disease:
Malabsorption.
Crohn's disease.
Ulcerative Colitis.
Cirrhosis.

Others:
Hyperthyroidisms.
Vascular anomalies.

=================

That's all.. Hope it will be helpful.