An overactive bladder can cause you to leak urine when you least expect it. You can mitigate this with simple lifestyle changes.
The average adult can hold their pee for about 3 hours but if you have trouble with this you probably have some type of urinary incontinence.