During the S phase of the cell cycle, the centrosomes duplicate, ensuring that each daughter cell inherits a centrosome. In the prophase of mitosis, centrosomes move to opposite poles of the cell, helping to form the spindle apparatus. This apparatus is essential for the proper alignment and separation of chromosomes.