As we know already, classification nothing but machine doesn't know what is the object, base on the features/similarities it will try to identify object is belongs to what. Here KNN creates the boundary and based on the similarities it will identify object. Maximum values which are found under boundary will be identified as object belongs to one category.