It divides the model into horizontal slices (layers), creates tool paths to fill them and calculates the amount of material to be extruded.