Hello Mandy,
This software function is supposed to calibrate the HardIron (offset brought by the board and the magnetometer). But this will work with one essential condition : you need to rotate the board/MAG31110 over the 3-axis during the execution of the calibration !
Look at the chart below (here, the board rotates at a constant speed, but you don't need to do that)

By rotating the magnetometer, you will change the magnetic field (induced by the Earth, like a compass). By capturing the min and max values, you will by able to calculate the offset of the MAG3110. By writing theses values in the OFF_axis_xSB register, the MAG3110 will be able to apply this hardiron vector compensation to the raw measurements: that's the calibration.
Hope this helps you,
Anthony