Generating rules from data for classification
If the data is unlabeled you either


manually label the data (if you have not too many samples)
manually label part of the data, train a classification model on it (and validate your model!) and use the model to label the unlabeled part, to speed up the labeling process
use pretrained classification/segmentation models (if your data is images)
use unsupervised learning algorithms to find patterns in the data, then manually inspect the groups obtained to find recognizable patterns and label the groups accordingly. The algorithm you should use depends on the type of features you have. With numerical features you can use distance-based clustering techniques like k-means, or dimensionality reduction techniques like Self-Organizing Maps or t-SNE


Basically, it depends on what kind of data you have and how many samples. I believe that more information on your data is required for providing more specific answers.