metaphase is when this occurs.
individual chromosomes are spread out in the cell nucleus. during metaphase, the nucleus dissolves and the cell's chromosomes condense and move together, aligning in the center of the dividing cell.
hope i helped! good luck.