I have pimples in back of my head  what can I use?

Skin lesion in head. Skin disorders need to be seen. What you describe as "pimples" may be many things. Common lesions in the scalp could be impetigo or piodermititis, fungal, but even herpes zoster or herpes simplex, psoriasis, lupus, skin cancer, scabies etc. Show it to a dr. Or dermatologist.
Acne keloidalis. It sounds like you have acne keloidalis nuchae. Treatment can vary from antibiotics like Doxycycline to steroid injections. To be sure you should see a dermatologist.