There are many possible causes. They include infection, kidney disease or injury, damage to the urethra, tumors, kidney stones (very rare without pain) or a blood clotting problem.
Here is an excellent link to a reliable site that discusses this in detail.
Please click ACCEPT.
Feel free to ask a follow-up question.