Many things can cause difficulty when urinating. Kidney stones, bladder problems, urinary tract infections and kidney problems or infections are just a few in a long list.
In a man difficult urination can mean enlarged prostrate. In a woman it may be a symptoms of bladder infection. If you can not urinate at all consult a doctor.
The first thing that springs to mind is infection. An infection can cause the tissue around the urinary tract to swell, leading to difficulty urinating. Another cause might be gallstones.