It is a firmware feature that must be explicitly enabled. Then you get 3 parameters in eeprom (which might be iniatlly totally wrong so check after enabling it).
What it does is quite simple. Let's say it takes 1mm if you reverse x direction to get extruder moving again on direction change, it will insert a 1mm move on direction change so the move command will then get the full length. Of course 1mm is way too much and would be a sign for bad hardware design. 0.3mm is easily possible if some parts can slip(belt, pulley on motor shaft) or are wobbly. For good compensation it is important that the error is always the same. A can slip or not error is not really fixable.