Painful sex

Ugh ladies I have been experiencing painful sex with some bleeding after. Any ideas what can cause that? It doesn't happen ALL the time.