Dear student.
A capsule is the slime layer usually made of polysaccharide that lies outside the cell wall of some bacteria. It provides protection against immune cells and enhances the ability of bacteria to cause diseases and prevents desiccation in bacteria.
Capsule can be also made up of polypeptide (D-glutamic acid), peptidoglycan and muramic acid in different bacteria.
Regards.