A cap is a form of head covering that generally soft and lacks a brim. They might be made of cloth or felt and some might be knitted.
A bonnet might be regarded as a form of cap.