Moles, or nevi, are clusters of pigmented cells on the skin. They can appear due to a combination of genetic factors and sun exposure over time.