In: Computer Science
Classification: you have a dataset of 2 classes that are already labeled. You learn a classifier from them. Then later on, whenever you have a new example, the classifier will tell you which class the example belongs to. Application: medical diagnosis (sick or not sick), classify spam/non-spam mails, etc.
Clustering: you have a dataset of unknown classes that are (usually) not labeled. You try to cluster them using K-means or DBSCAN and they are now grouped into groups. They share some characteristics and you learn useful information from them. They can also be used as a weak classifier because you can classify a new example into one of the established clusters, but this cluster might not have a real meaning for humans. Application: recommendation system (Amazon, youtube), survey analysis, etc.
The above were simplifications of what classification is and what clustering is. A classifier can classify 10000 classes but the main goal is still the same. A classifier classifies, a clustering method performs clustering.
Classification falls under supervised learning, and clustering falls under unsupervised learning. You will seldom get into a situation where you will have to choose the one over the other one, but rather to know when to use the one or the other. Generally, you will use classification on labelled data (supervised) and clustering on data without labels (unsupervised).
There are certainly cases where the two techniques compliment each other, you might have a set of labelled data, and a set of unlabeled data and use clustering to figure out to what group/label your unlabeled data belongs, and a classification technique to train a classifier for future prediction.
If your data is fully labeled, generally people want to choose a machine learning model that can take advantage of those labels. Clustering methods do not. Even if you have 1000 files of sick and non-sick patients, the clustering do not learn how to classify who is sick and who is not, it just groups people who are similar using its own objective/metric, this objective usually has nothing to do with sick/non-sick.
On the other hand, if your data is not labeled, you can’t really learn a discriminator/classifier. You can only analyze your data using a clustering method.
One might still want to cluster data even if they are already labeled. It’s just usually for performance measurement of the clustering.