Confused

I had a light red spotting before my period and now I'm having it after my period to. what can be causing this?