Depends on the instruction...
Each an instuction might use it differently but on the whole if you add two numbers to gether for example and the result is larger then what the instruction can handle then the CY flag will turn on... This is just one possible scenario...generally instruction specific check out plc manual for the instructions you are using etc.