If the needle of the compass were mounted so it could pivot freely about its center of gravity in three dimensions, it would align with the magnetic field, pointing down (or up) at the dip angle in the direction of local Magnetic North. Since the dip angle is not of navigational interest, the compass is constructed so that is constrained to rotate essentially only in the horizontal plane.
In an aviation compass, this is done by lowering the CG below the pivot point and making the assembly heavy enough that the vertical component of the magnetic force is too weak to tilt it significantly out of the horizontal plane. The compass can then work effectively at all latitudes without specific compensation for dip. However, close to the magnetic poles, the horizontal component of the earth's field is too small to align the compass, and the compass becomes of little use for navigation.
Because of this constraint, the compass only indicates correctly if its card is horizontal. If it is tilted out of the horizontal, it will be affected by the vertical component of the earth's field. This gives rise to two distinct errors.