It's perfectly safe to have sex during pregnancy. Your partner's penis can't penetrate beyond your vagina, and the baby cannot tell what's going on. It is normal for your sex drive to change during pregnancy though. Don't worry about this, but do talk about it with your partner. Find out more about talking about sex.
Later in pregnancy, an orgasm or even sex itself can set off contractions (known as Braxton Hicks contractions). If this happens, you'll feel the muscles of your womb (uterus) go hard. This is perfectly normal and there's no need for alarm. If it feels uncomfortable, try your relaxation techniques or just lie quietly until the contractions pass.
Your midwife or doctor will probably advise you to avoid sex if you've had any heavy bleeding in pregnancy, since sex may increase the risk of further bleeding if the placenta is low or there is a haematoma (a collection of blood).
You'll also be advised to avoid sex if your waters have broken (rupture of membranes) as this can increase the risk of infection. If you're unsure, ask your midwife or doctor.
Some couples find having sex very enjoyable during pregnancy, while others simply feel that they don't want to have sex. You can find other ways of being loving or making love. The most important thing is to talk about your feelings with each other.
While sex is safe for most couples in pregnancy, it may not be all that easy. You will probably need to find different positions. This can be a time to explore and experiment together. Sex with your partner on top can become uncomfortable quite early in pregnancy, not just because of the bump but because your breasts might be tender. It can also be uncomfortable if your partner penetrates you too deeply. It may be better to lie on your sides, either facing each other or with your partner behind.