Machine learning is all about learning how to make decisions based on data. Imagine you would like to create an email spam filter. After a while, you may notice that most spam emails contain inappropriate words that try to attract users for instant profits or other stuff. So you create a simple function that will mark as spam every email that contains such a word. But after a while, your users start to complain that even regular emails are being marked as spam. So you improve your solution and add more complex rules, perhaps some combination of allowed words. Improving and evaluating your function after every feedback. You can see that creating such a function would be a very tedious and complex task, that's where machine learning can save you! Instead of defining these rules yourself, you provide your models with data samples, mapping each message to a label "SPAM" or "OK" and using the training procedure, the model will infer these complex rules for you.