I have a small pimple 2 months ago, I pinched it then it turned harder like a cyst, it doesn't hurt or pain like dead skin, how to get rid of it?

See a dermatologist. Sometimes these pimples are actually small cancers- like basal cell or squamous cell cancers, rarely melanoma depending on the type of skin and exposure to sun you have had in your life. The best way to diagnose a non healing pimple or ulcer is to biopsy with the dermatologist and have an expert pathologist look at it.