ML Basics: K Nearest Neighbors
One technique for doing classification is called K Nearest Neighbors or KNN. To use the algorithm you need to have some data that you've already classified correctly and a new data point that you wish to classify. Then you find the K (a somewhat arbitrary number) of existing data points that are the most similar (or near) to your new datapoint. You assign the new datapoint to whatever class the majority of the neighbors have.