The parameter 'k' in KNN refers to the number of closest neighbours to include in the majority voting procedure.
The majority voting principle is used by the KNN classifier to identify the class of a data item. When the value of k is set to 5, the classes of the five nearest points are examined. The majority class is used to make predictions. Similarly, the mean value of the five nearest points is used in kNN regression.