Birth Control &a Pregnancy

Ana
So I'm on birth control and I was wondering, while on birth control my boyfriend can ejaculate in me and I won't get pregnant right? Isn't that what birth control is for? I know it won't protect against STDs but it will prevent pregnancy as long as I'm taking it right won't it?