Your OB/GYN can help answer any and all questions you have about your pregnancy. As your pregnancy continues, it is likely that you will have more questions so you should definitely feel comfortable talking with your doctor
as he or she can answer specific questions about the pregnancy and birth process, as well as answer any concerns you may have about your specific case.
When it comes to ultrasounds and sex determination, the answer is simple: the ultrasound
provides pictures and technicians will look for evidence of external genitalia to help determine the baby's sex. Clearly, this has several caveats. First, ultrasounds can't be used for sex determination until after a specific point in gestation when the fetus is developed enough to see (or not) a developing penis. Second, fetuses can sometimes be 'uncooperative', and if his or her legs or crossed and stay that way for the duration of the ultrasound, it can be impossible to tell.
Finally, it is possible to be fooled--sometimes on an initial scan what will look like the presence or absence of the appropriate parts turns out not to be correct on futures scans. The technician who performs the scan can give you a good idea of how 'sure' he or she is about the sex determination.