incase you get pregnant on the IUD?

My hubby and I were talking about this earlier, so I know that is you do get pregnant and they take it out it can cause a miscarriage but what happens if you leave it in? Can you even do that ?