The phenomenon you are experiencing is completely normal and is not a symptoms of some underlying medical problem. Basically, what happens when you urinate is that urine passes from the bladder into the urethra which is a long tube that exits at the tip of the penis and allows urine to leave the body. When the bladder is empty of urine, you stop feeling the need to urinate and you may walk away from the toilet. However, there still may be a bit of residual urine left in the long urethra that you may not feel. When you walk away from the toilet, this urine leaks out into the underwear. The way to prevent this is to take a few seconds after finishing urination to allow all the urine to drain from the urethra. As always the diagnosis and the management of your particular concerns will require a physical examination by your personal physician. Setting up an office visit with your primary care doctor
if symptoms persist might be advised.