Machines learn pretty much the same way we do--they learn from their mistakes. They first start by making an initial guess (random weights for parameters). Second, they use their model (for example, GLM, RRN, isotonic regression) to make a prediction (for example, a number). Third, they look at what the answer should have been (training set). Fourth, they measure the difference between actual versus predicted answers using a variety of techniques (such as least squares, similarity, and so on).
Once all these mechanics are in place, they keep repeating the process over the entire training dataset, while trying to come up with a combination of parameters that has the minimal error when they ...