The previous examples show basically how machine learning works.
People use more complicated models to solve more complicated problems.
But the basic idea is the same!
People try to find a pattern in the trianing data and use the pattern to make predictions.
You can think of it as a "black box" where you input the data and get the prediction.
But the "hidden" part are combinations of many simple functions.