Don’t take it out!
I’ve been advised by professional piercing companies NOT to take out a body piercing if it becomes infected, especially if the piercing is new. Taking it out may cause the infection to get trapped inside the healed skin, causing an abscess, which can be very serious.
How far along are you? Is your skin stretching a lot? If not, you should be able to keep it in and clean it twice daily with anti-microbial soap (I use a brand called Hibiclens) until it heals. Do not use Neosporin, Bacitracin, or similar products. They will hinder the healing of your piercing.
I would contact your local piercing professional and ask for more advice if I were you, especially since being pregnant will make the matter a little more complicated. When it is healed, I would suggest removing the piercing so it doesn’t get stretched, but not before the infection is cleared up.
Lucky’s Tattoo and Piercing is an excellent company where I got several of my piercings, and I would trust their advice over anyone’s. Their “FAQ” page has lots of great information about caring for body piercings.