The bladder is a small bag that holds up to about a litre of waste liquid from the kidneys. The bladder wall is made of smooth muscles that can stretch. As they do so, they send signals to the brain warning that the bladder is filling and it is time to have a pee.
The bladder is closed off by a valve, so it only releases its liquid when we strain out muscles to push liquid from the bladder.