What's the difference?

Tia
What is the difference between the brown discharge and the actual blood coming out when you get your period? I think my period is ending but there's brown stuff around the outside of the tampon, but in the inside there is actuall blood. What's going on?