KDE works by placing a kernel function (often a Gaussian function) over each data point and summing the contributions of each kernel to estimate the density at any location. The result is a continuous surface that represents the density of points across the study area. The choice of bandwidth (the width of the kernel) is crucial as it determines the smoothness of the resulting density estimate. A smaller bandwidth can reveal more detail but may be noisy, while a larger bandwidth provides a smoother estimate but may obscure important local variations.