A cubic spline is a piecewise polynomial function used to interpolate or approximate data points with a high degree of smoothness at the boundaries of the pieces. It ensures continuity and smoothness up to the second derivative, making it ideal for applications requiring smooth transitions between data points.