An example nearest-neighbour model on two overlapping groups of points. One dial sets how many neighbours vote. Both ends of the dial give a bad model, but only one of them looks bad.
Forty-one neighbours vote on every point, so the regions are two smooth bands. This is the worst model here: too simple to follow the real shape of the data, even though it looks the most sensible.
With fewer voters, the boundary starts to follow the data. Both scores improve together, and it is tempting to think they always will.
Seven neighbours: the best score on data the model has not seen. You can only find this point if you kept some data aside before you started.
Training accuracy keeps rising, but accuracy on unseen data is already falling. Only the second number tells you how the model will do in real use.
Three neighbours, and small islands appear around single points. The model is now fitting this particular sample instead of the two groups.
One neighbour. The model scores 100% on its training data, because every point is its own nearest neighbour, but on unseen data it is back to where the simplest model started.