G29 is like the G28 command except on steroids. It probes multiple points on the bed and then uses that information to find the normal vector to the X & Y axis. It produces a 3 x 3 bed correction matrix that can be used by all the movement routines. When a specified coordinate (vector) in the GCode is multiplied by the correction matrix it produces a new coordinate in the new space that is properly located given the bed might not be flat.