A woman is either clean, in her menses or in the state of istihada.
If you get spotting before your actual menses begins, this is nothing. Your menses begins when the flow of blood starts and it ends when your purity is visible and this can be detected by seeing the pure white thread like discharge or by seeing complete dryness.
If you get spotting without flow and you are not in your menses, this is nothing.