K-nearest neighbors (knn) is a simple yet powerful machine learning algorithm used for classification and regression tasks. It works by identifying the 'k' closest data points in the feature space to a given query point and making predictions based on the majority class or average value of those neighbors. This approach is particularly effective in biomedical signal analysis, where it can classify signals or identify patterns based on similar historical data.