What is it when you it burns when you do the restroom then u bleed?

? Urinary infection. Your symtoms are like due to a urinary tract infection causing cystitis plus probably urethritis. You should get a urinalysis plus urine culture. Consider seeing a urologist if the culture is negative.
Pee or poop? Burns when you pee, then it bleeds: can be bladder infection, interstitial cystitis, passing a stone, less likely tumors; other causes less likely, but possible. Burns when you poop, then bleeds: likely anal fissure, hemorrhoid; could be other things, including colitis, tumors, including cancer. See your doc either way.