A kernel function is a mathematical function used in the Parzen-window method to estimate the probability density function of a random variable. It is placed at each data point and contributes to the overall density estimation. Common kernel functions include Gaussian, Epanechnikov, and uniform kernels. The choice of kernel function can affect the smoothness and accuracy of the density estimation.