k-nearest neighbors is a machine learning method that classifies or predicts a value by comparing a new example with the most similar examples in a dataset.
It is simple and intuitive, but performance depends heavily on distance measures, feature quality, scaling, and dataset size.