A urostomy is a surgical procedure where a stoma is created to divert urine from the bladder. This may be necessary when the bladder is not functioning properly, such as in cases of bladder cancer, trauma, or certain medical conditions. The urine is then directed to a pouch worn externally on the body.