The urethra is the tube that connects the bladder passing urine to outside the body. Disorders in the urethra (particular anterior urethra) such as urethra infection or cancer cause the bleeding. Because the urethra is the front end of urinary tract, urethra diseases cause the visible blood in the urine, which is seen often at the first portion of the urine during urination.
Please see your doctor for diagnosis and treatments when you see blood in the urine or experience pain when urinating.