Collaborative filtering is a technique used by recommender systems to predict items users may like based on opinions of similar users. K-nearest neighbors (KNN) is a collaborative filtering algorithm that finds the k most similar users and bases predictions on the ratings of those neighbors. The document describes KNN collaborative filtering, including finding neighbor similarity, making predictions, and evaluating error rates on a movie recommendation system using the MovieLens dataset.