Sushant, there are a number of different techniques that may be used, but probably the simplest is as follows:
First of all, set the compass compensators to neutral and align the aircraft at or near to magnetic North, East, South and West on an approved compass swing pad, recording the actual headings as shown by an external compass.
Now, suppose that at North the aircraft compass shows 003 degrees with the external compass showing 001 degrees; at East the a/c compass shows 094 degrees and the external shows 092 degrees; at South the a/c compass shows 180 degrees and the external shows 178 degrees; and at West the a/c compass shows 272 degrees and the external shows 270 degrees. The result is that there is an error of two degrees at all four cardinal headings; because the error is the same at each heading this is an error of alignment of the compass in the aircraft, perhaps the compass mounting bracket is not straight. This is called coefficient A Error and is corrected by adjusting the fore-aft alignment of the compass in the aircraft.
Once you have got rid of the Coefficient A Error, align the aircraft at or close to magnetic North again. Determine the actual heading of the a/c and adjust the N-S Compensator in the compass so that the aircraft compass reads the same as the external compass. Next align the a/c at or near magnetic East, determine the aircraft heading and adjust the E-W Compensator so that the a/c compass reads the same as the external compass. Then position the aircraft at or near South.
Now for the sake of argument, say that the internal compass shows a heading of 176 degrees while the external compass shows 180 degrees, giving a difference of four degrees. You then adjust the N-S Compensator again to remove half of the error, so that the aircraft compass now reads 178 degrees. You then position the aircraft on a heading at or near West; suppose the a/c compass shows 273 and the external shows 269. You then adjust the E-W Compensator so the a/c compass reads 271 degrees. After you do this you then position the aircraft at various headings (in Australia at each thirty degrees, i.e 300, 330, 000, 030, 060 etc.) and record the differences between the headings indicated by the aircraft compass and the external compass. You then calculate and enter the corrected headings on the Compass Correction Card.
Simple really, once you have done a couple.
Monty Python's Flying Circus has nothing to do with aviation, except perhaps for Management personnel.