K-Nearest Neighbors (KNN) is a supervised learning algorithm used for classification and regression tasks. It classifies new data points based on similarities to the k nearest neighbors in the training dataset. In regression, it predicts values by averaging the outcomes of the k nearest neighbors.