It is highly recommended to consult a doctor before exercising while you are pregnant. The need is even higher if you are pregnant for the first time or have not done any exercises before. There is no bar on exercising while pregnant, but the doctor can recommend some exercises, which can produce better results. It is also important to know some of the risks or side-effects associated with these exercises.
The first step for you is to seek an appointment with your doctor. If you have been seeing a doctor or gynecologist from the pre-pregnancy and initial pregnancy phases, it is better to discuss the matter with the same doctor. They can have a better understanding of your situation and recommend better solutions. Otherwise, you can see any doctor and ask about the exercise and protect yourself. Also, if you do not feel comfortable for any reason to discuss the matter with a male doctor, you can specifically ask for an appointment with a female doctor.
If its not your first gestation and you exercise regularly, you may consult the doctor for general advice. Do not take risk and start exercising on your own. It is possible that your situation might not be the same as it was during your last gestation. The doctor will be in a better position to check yourself and then recommend the exercises you can do. Do not assume that you know everything since you have been through this before; it can risk injury to yourself and your unborn baby and can put you in a lot strain and difficulty, medically.
You can also ask your doctor about advice on specific exercises you want to do. Or else, you can ask about what exercises you can do to improve health of certain body parts. The doctor can recommend you the type of exercises you can do and when and how you can do them.