What do you do with your tampon when having a 💩?

Do you leave it in while pushing your BM? Or do you take it out and poo? What if you leave it in and get poo on the string and its at your vagina all day, would that not give infection?Â