This is how skin cancer develops: 1. UVA and UVB rays hit the epidermis. 2. DNA in skin cells begins to break down. 3. Skin produces melanin to protect itself from more damage. 4. Immune system tries to repair damage. 5. More sun exposure hampers repair. 6. Damaged cells can mutate into skin cancer within 5 years.