The Kullback-Leibler Divergence (KLD) measures how one probability distribution differs from another. In some sense, the KLD can be considered as a statistical distance, however it is not actually a metric/distance function primarily due to its asymmetry and other factors.
KLD can be applied to both discrete and continuous distributions with the corresponding formulas:
Discrete: \(D_{KL}(P \parallel Q) = \sum_{i}^{}p(x_i)\log(\frac{p(x_i)}{q(x_i)})\)
Continuous: \(D_{KL}(P \parallel Q) = \int_{- \infty}^{\infty}p(x)\log(\frac{P(dx)}{Q(dx)})dx\)