Tissue removed at surgery is always sent for histopathology (the examination of tissue under the microscope, including Cytology) examination. In addition very small samples of tissue can be obtained by needle or core biospy. The microscopic features of individual cells are used to determine the nature of the suspected melanoma. Pathologists are doctors who specialise in the assessment of surgical material aka histopathologists.
There are many features that need to be assessed by the pathologist.