Curious question

What causes spotting in the first trimester?