Probiotics exert their effects by maintaining a balanced gut microbiota, enhancing the intestinal barrier function, modulating the immune response, and producing antimicrobial substances. They help in combating pathogenic bacteria and reducing inflammation, which can alleviate symptoms of gastrointestinal disorders and other health conditions.