It occurs after completion of the polypeptide chain. It can occur at Ser, Thr, Glu, Asp, His, Lys, and Tyr. Many enzymes will phosphorylate proteins with ATP, but they differ in specificity. These are called Kinases. Kinases are membrane-bound in the smooth endoplasmic reticulum and Golgi.
Caseins are phosphoproteins.
Caseins are in multiphosphorylated forms - the same casein polypeptide chain may be phosphorylated at varying sites. Probably due to the tremendously high rate of protein synthesis which exceeds the phosphorylating capacity of the membrane-bound kinases. A similar protein in mouse milk is not phosphorylated.