Pregunta de entrevista de IBM

How does the KNN algorithm work?