Can a pimple turn into a form of cancer?

No. Pimple is where one of the glands/ducts get obstructed and small infection and pus forms. Many of these and recurring forms are acne. There are many treatments. Some people develop scars but cancer is not a risk that is significant. However any situation that constantly irritates the same spot could eventually lead to a cancer is always possible. It's best to keep skin clean.
No. Not if it is truly a pimple. Basal cell carcinoma can look like a pimple. If it goes away after a couple of weeks, it is probably not cancer.
But how did u know. It was a "pimple" (? Comedone, as in acne) to start? Many see something on the skin and say "a pimple". I've seen this be the first manifestation of a primary skin cancer (squamous or basal), or even metastatic from an asymptomatic visceral source. Don't be too sure that you know a pimple from this!