Ceilings and cornice: Some cracks are serious

Before you paint the house, do the necessary maintenance to the ceiling and cornice.

What are those white lines on the ceiling? How do you get rid of them?

Must I replace the ceiling if it starts to sag?