what can cause blood when not on period

I am on the pill which is great, it helps with my periods and not getting pregnant. Here is my question when having intercourse my mucus turned red so it had some blood in it. I finished my period two weeks ago so what would cause this??