You should change your pad every time you pee if it has blood or urine on it.
It's not strictly required to change your pad every time you go pee although it's often a good idea for comfort and hygiene and can help reduce odor and potential infections and rashes.
Even if you don't pee, changing your pad frequently helps to maintain cleanliness and comfort, especially during menstruation.
When menstruating or on your period it's recommended that you change your pad every 4 to 8 hours or sooner if it gets full of blood.
Change your pad as often as you need too, especially if it's wet or bloody and you feel uncomfortable.
If you have a heavier flow then you may need to change your pad more often.
And if you're active you may also need to change your pad more often when active.
Also consider your diet and fluid intake as certain foods and increased fluid intake can also affect your bladder and may also require you to change your pad more frequently especially if you leak out some urine into the pad.
You should also change your pad in the morning after you wake up as well.
The heavier your flow on your period the more often you will need to change it and the lighter the flow of your period the less often you will need to change it.