You should change a toddlers diaper at least every 2 hours or if it gets wet enough sooner.
Make sure to at least check your toddlers diaper for wetness every hour because sometimes they can soak a diaper enough to need changed if they've held enough urine in and let it out all at once.
Toddlers usually get pretty regular when they need to urinate and will usually soak a diaper.
You should never leave your toddler in the same diaper longer than 3 hours unless overnight or you're in a situation where you can't change the diaper sooner such as on a road trip or in an airplane etc.
In those cases where you can't change the diaper before 3 hours you should apply diaper cream to prevent diaper rash but change the diaper as soon as you can.