Melanoma can be prevented by avoiding excessive exposure to UV radiation, especially during peak sun hours between 10 a.m. and 4 p.m., wearing protective clothing and sunscreen, and avoiding tanning beds.