What does this mean?

Can spotting be like a period ? I had unprotected sex and my so called period came early ?