Freckles (spots of melanin on the skin, and distinct from moles) are known to be influenced by sunlight.Studies have found that sunburns and too much time in the sun can increase the risk factors for melanoma. This is in addition to those who have dysplastic nevi being at higher risk of this cancer (the uncertainty is in regard to acquiring benign moles). To prevent and reduce the risk of melanoma caused by UV radiation, the American Academy of Dermatology and the National Cancer Institute recommends staying out of the sun between 10 a.m. and 4 p.m. standard time (or whenever ones shadow is shorter than ones height). The National Cancer Institute also recommends wearing long sleeves and trousers, hats with a wide brim, sunscreens, and sunglasses that have UV-deflecting lenses. Diagnosis
Clinical diagnosis can be made with the naked eye using the ABCD guideline or by using dermatoscopy. An online-screening test is also available to help screen out benign moles. Classification
Melanocytic nevi can mainly be classified by depth, being congenital versus acquired, and/or specific dermatoscopy or histopathology patterns:

Depth

Congenital versus acquired
Congenital nevus: Small to large nevus present at or near time of birth. Small ones have low potential for forming melanomas, however the risk increases with size, as in the giant pigmented nevus. Acquired nevus:  Any melanocytic nevus that is not a congenital nevus or not present at birth or near birth.Specific dermatoscopy or histopathology patterns
Recurrence
Recurrent nevus:  Any incompletely removed nevus with residual melanocytes left in the surgical wound.
Common mole hair removal procedures include plucking, cosmetic waxing, electrolysis, threading and cauterization. Aging
Moles tend to appear during early childhood and during the first 30 years of life. They may change slowly, becoming raised, changing color or gradually fading. Most people have between 30 and 40 moles, but some have as many as 600.The number of moles a person has was found to have a correlation with telomere length. However, the relation between telomeres and aging remains uncertain. Complications
The American Academy of Dermatology says that the vast majority of moles are benign. Data on the chances of transformation from melanocytic nevus to melanoma is controversial, but it appears that about 10% of malignant melanomas have a precursor lesion, of which about 10% are melanocytic nevi. Therefore, it appears that malignant melanoma quite seldom (1% of cases) has a melanocytic nevus as a precursor. Cause
The cause is not clearly understood, but is thought to be caused by a defect in embryologic development. This is in the first twelve weeks of pregnancy. The defect is thought to cause a proliferation of melanocytes. This means melanocytes, the cells in the body in charge of normal skin color, are being produced at an extremely fast rate, thus causing the melanocytes to form in clusters instead of spread out, causing abnormal skin pigmentation in some areas of the body. Genetics
Genes can have an influence on a persons moles.