PCV13 works by stimulating the immune system to recognize and fight against the specific types of pneumococcal bacteria covered by the vaccine. It is a conjugate vaccine, meaning it contains pieces of the bacteria's capsule linked to a protein to enhance the immune response, making it suitable even for those with a weakened immune system, such as children and individuals with cancer.