The need for the toilet and more specifically to urinate is measured with a Toilet symbol. A orange toilet symbol indicates you need to urinate. A red symbol indicates that you are desperate to urinate.
If you are really desperate (red warning icon) for the toilet this also affects your character's movement speed and means that you can little more than shuffle until you relieve yourself. You have a movement speed of 11 when in this effect.
To do this you press the toilet symbol which replaces the hand pickup button.
Drinking fluid will eventually make you need the toilet and drinking a Beer makes you instantly desperate to go.
Going to the Toilet also decreases your Cleanliness.
Conversely if your character already has decreased Cleanliness, then drinking water while in this state has an increased chance of urination.
Be careful of using the toilet outside of base. It is possible for you to be attacked while using the toilet which can result in you dying. You will not be able to heal, run, or attack while using the toilet. If you are unsure on how close you are to using the toilet. Drink a beer or enough water to use the toilet before venturing out.