We don't know the cause of this strange phenomenon. Since it is mainly seen in puberty there may be a hormonal effect.
There are no special tests to diagnose Keratosis Pilaris and there is no specific treatment. Moisturizing the skin is important to soften the dryness and reduce roughness. Topical retinoids (Retin A, Tazorac) can help to promote cell turnover and prevent plugging of hair follicles.
Image and case from Consultant Live