What causes bleeding in the 2nd and 3rd trimesters of pregnancy?

Varies. Multiple possible causes. Any bleeding later in pregnancy should be evaluated by your physician. Bleeding can be from the cervix, or from the pregnancy (placenta). If the placenta is low in the uterus (placenta previa), bleeding is likely and can be life threatening. Abruption or separation of the placenta from the uterus or the bleeding can come from the margin of the placenta. Seek help.
Several. It may simply be from the cervix being eroded. However sometimes premature opening of the cervix can cause bleeding. Also placental problems such as a the placenta separating too soon or the placenta being over the cervix can do it.