The Voting Mechanism:
$$ \hat{y}(x) = \text{mode}\{y_i \mid x_i \in N_k(x)\} $$
Where $N_k(x)$ is the neighborhood of $k$ closest samples.
Changing $k$ alters the Voronoi-like tessellation. A low $k$ creates complex, non-linear boundaries that are highly sensitive to individual outliers.