Several factors. If the lesion is larger than a pencil eraser, irregular edges, strange or color variations, assymetric, growing size or lesion bleeds. Any of these features then dermatology should see. No sure fire way without a biopsy.
Change! Any mole that changes size, changes color, changes character like bleeding, itching, painful or any other change, should be check out by a doctor with an interest in skin disease. See your pcp, dermatologist, surgeon or other physician. You may only need to be reassured but a biopsy or removal of the lesion and study by a pathologist may be necessary. Do not risk it! Get seen!