The two main causes of skin cancer are the sun's harmful ultraviolet (UV) rays and using UV tanning beds. The good news is that if skin cancer is caught early, your dermatologist can treat it with little or no scarring and high odds of eliminating it entirely.