What, exactly, is a sun tan?

A sun tan… what exactly is it?

Is the darkening of skin a sign of burning (and thus damage) to the skin, or is it (as I heard argued yesterday) merely melanoma ‘rising’ to the surface of cells to help further protect the skin (and thus is a perfectly natural response to being in the sun)?

Is a tan considered healthy, or at least not unhealthy, from a cellular perspective? What process do individual cells undergo in the act of ‘achieving’ a tan?

Thanks.

How suntans work