Cogging is the magnetic attraction between the rotor magnets and the stator poles when the motor is at rest. You can feel it easily by trying to turn an unpowered motor by hand — it resists, then jumps.
A common misconception is that the copper coils cause it. They do not. The magnets sit comfortably aligned with a pole, and to keep rotating they must cross an air gap before reaching the next one. The rotor hangs on to the current pole until it is just past halfway across the gap, at which point the pull of the next pole becomes stronger and the rotor snaps forward. That clunking, jumping sensation at very low RPM is cogging, and it is why a noticeable amount of torque is needed just to start rotation.
Designers reduce it through skewing the rotor, using fractional-slot windings, or adjusting the magnet-to-slot ratio.