Can you spot and still be pregnant?

Just wondering if spotting definitely means you’re out since you can spot before your period comes?