When I'm on my period and I pee it burns but it just started happening, it never happens when I'm off?

Infection possible. You may need to see a healthcare provider to have your urine evaluated for signs of a bladder infection. In the meantime you can try Azo which is sold OTC for relief. I also recommend drinking plenty of water and cranberry juice.
Temporary irritation. This maybe related to some nonspecific irritation of your external genitalia, perhaps caused by the menstrual blood itself. Make sure you follow your usual procedure during your period. If it will not go away, or recurs you have to see your gyn.