K-nearest neighbors (KNN) is a non-parametric classification technique where an unlabeled sample is classified based on the labels of its k nearest neighbors in the training set, as determined by a distance function. The basic steps are to 1) compute the distance between the test sample and all training samples, 2) select the k nearest neighbors based on distance, and 3) assign the test sample the most common label of its k nearest neighbors. Key aspects include choosing an appropriate value of k, distance metrics, handling high-dimensional data, and reducing computational complexity through techniques like condensing.