Predicting unknown data using Knn
when you "predict" something in KNN-classify problems, you are classifying new information.

yah, KNN can be used for regression, but let's ignore that for now.

The root of your question is why bother handling known data, and how can we predict new data.  Let's do KNN in R1, with two training examples.  The first one will be 0 and it will be class A, the next one will be 100 and it will be class B.

So, KNN is what's known as a lazy classifier. You actually aren't training, any hyperparameters, just loading the training data.  I've loaded two points, and now I want to classify a new point.  Let's consider the point 0.  Since we already have the point 0 labelled as class A, we know it's going to be class A.  What about the point 4?  It's closer to 0 than to 100, so it's class A.
Similarly, the point 95 is closer to 100, so it's class B.

KNN is really just doing those comparisons with more points and/or more dimensions.

EDIT: user asked the following: how would I predict if it is yes or no, based on the classification I have done before? 

The most basic implementations of KNN check the distance from your new case to all of the points in the training data.  If you want to visualize it, it's possible with one, two, and maybe 3 dimensional data.

In python, you can do as follow (from scikit-learn.org):

X1 = np.random.normal(0,1,100) #values centered around 0
X2 = np.random.normal(6,.1,100) #values centered around 6
X = np.concatenate([X1,X2])
X = np.array(X).reshape(-1,1)
Y = [0 for y in range(100)]+[1 for y in range(100)] #2 classes
Y = np.array(Y).reshape(-1,1)

clf = neighbors.KNeighborsClassifier()
clf.fit(X, Y)


now, you can predict by calling predict

clf.predict(1)
clf.predict(4)
clf.predict(.1)


KNN visualized in 2D: 



from: https://www.analyticsvidhya.com/blog/2014/10/introduction-k-neighbours-algorithm-clustering/