Hello,
This is Dr. Klarida Papaqako answering your question.
From your description, looks like they are:
-- hair follicles infected (called
folliculitis) who may either become
pimples with a white spot in top, or if they don't pop, and are not painful, they become black spots.
-- Another problem it may be, are
acne spots, but you must also have pimples in the face, chest and shoulders also, because these are the common places they appear.
Both conditions are not serious. But if you notice they spots hurt, have pus on top, are growing in number and size, then I would recommend to do a visit to a doctor, so he confirms diagnoses and gives you the proper treatment.
Meanwhile, keep in mind, to wash your skin with antibacterial soaps, and eat a healthy diet with plenty of fluids, fibers, fruits and vegetables.
Take care.