Actually, this question has come up several times. Search the forum for results.
I would add to what Steve Carr has said in that one should always calibrate the compass whenever you have traveled some distance away from the last place you flew the aircraft, or whenever you see any strange behavior regardless of whether you see any warnings.