Your doctor will prescribe antibiotics to treat your bacterial vaginosis. Antibiotics are drugs that kill bacteria. You can take them as tablets that you swallow, or as a gel, a cream, or capsules (called ovules or pessaries) that you put in your vagina. All methods work equally well.
Here are the types of antibiotics normally used for bacterial vaginosis (followed by their brand names).  
clindamycin tablets (Dalacin C)
clindamycin vaginal cream or ovules (Dalacin)
metronidazole tablets (Flagyl)
metronidazole vaginal gel (Zidoval)
You have to use these medications for between five and seven days. There is also a stronger dose of metronidazole that you can take just once.
If you are pregnant or breastfeeding, your doctor will advise you about which treatment is suitable for you.
You can get side effects from antibiotics, including feeling sick and having thrush (a yeast infection) in your vagina. Metronidazole pills can cause a metallic taste in your mouth.   It's important to avoid alcohol while taking metronidazole because it could make you very ill, with symptoms such as redness in the face, headaches, trouble breathing, nausea, and vomiting. 
Clindamycin cream and ovules are oil-based so they might weaken latex condoms and diaphragms. 
There is some good evidence that these antibiotics will clear up bacterial vaginosis.   One big summary of research (called a systematic review) found that using clindamycin cream or metronidazole gel helped about three-quarters of women get better. But up to half the women who used a dummy treatment for comparison (called a placebo) also got better. 
There's also lots of research to show that creams, gels, and tablets work equally well.   In these studies, about 8 in 10 women were cured after using any of these treatments.
The different ways of using tablets, creams, and gels mostly seem to work about the same for getting rid of symptoms.     But taking metronidazole tablets twice a day for seven days might get rid of symptoms better than just taking one big dose. 
Most of these studies didn't look at how often the symptoms of bacterial vaginosis came back. But one small study found that about half the women had bacterial vaginosis come back within two months after treatment. If you are pregnant and have had a premature birth in the past
Having bacterial vaginosis has been linked with having problems in pregnancy, such as having your baby too early (before the 37th week of pregnancy). Doctors call this a premature or preterm birth. So researchers have looked at whether treatment with antibiotics helps to avoid these types of problems.
If you have had a premature birth in the past and are pregnant, then taking antibiotics for your bacterial vaginosis can help lower your risk of having a small (low birth weight) baby.  Women who had antibiotics for their bacterial vaginosis were about three times less likely to have a small baby than women who weren't treated with antibiotics. But treatment with antibiotics didn't make any difference to whether women gave birth early or had other problems in childbirth. If you are pregnant and haven't had any problems in pregnancy before