When two fields overlap, they add as vectors. This is called superposition. Where two fields are equal in size and opposite in direction, the total is zero. That spot is a neutral point (or null point).
A compass at a neutral point feels no field, so it has no preferred direction. It stays wherever you leave it.