!!!!help!!!!!

I’m not sure what to do. I’m only 21 and my boyfriend is deployed. When do I tell him? We weren’t trying I’m on the pill. Do I go to the doctors if so what do I say or ask for?