In classical software engineering, you define the function and create its body that will process the input in a specific way, providing well-defined output. In machine learning this process is reversed; you provide the model with inputs and outputs, and it will iteratively learn and improve on how to process the inputs to select the correct outputs. This is called training and after it's done, the model can reason even over the previously unseen data.