Cats have urination or other elimination problems for a number of reasons, both medical and behavioral. There are some common causes of inappropriate urination as well as some solutions. Due to the variety of influencing factors and severity of several possible conditions, it's best to consult a veterinarian at the first sign of problems.
When litter-trained cats fail to urinate in the litter box, it is usually the sign of a medical issue or a behavioral response to a change in its environment. If the cause is readily apparent, it's best to attempt a solution at home. If no recent changes have occurred, it's best to schedule an appointment with a vet as soon as possible.
The most common environmental causes of cats' aversion to litter boxes are a dirty litter box, heat-related territory marking (in unsprayed/unneutered animals), not enough litter boxes for the number of cats, declawing (which is actually toe amputation), aversion to new or scented litter, food or water dishes too close to the litter box, or stress. The medical conditions that result in cat urination problems are many. The most common are colitis (inflamed colon), bacterial infection, trauma, tumors, calculi (bladder stones), diabetes, kidney disease, liver disease, adrenal gland disease, hypocalcaemia, or pyometra (pus in the uterus).
Cats are just as susceptible to psychological stress as people. Changes in furniture location, loud noises, unfamiliar cleaning product scents, or inter-cat tension can all influence a feline's urinary habits. Cats instinctively use liter boxes and do not urinate or eliminate outside of them in an effort to "get back" at their owner---inappropriate urination is not "acting out." The addition of new cats or exiting of old cats is traumatic for felines, are quite social animals, and as such they may need time to adjust their behaviors.
If a change in a cat's environment is not glaringly apparent, consult a vet as soon as possible. Cats should be spayed or neutered as soon as possible to avoid territorial spraying, which is an instinctual habit. "Declawing" is not an option---it's a form of toe amputation that leads to many problems, including an avoidance of hard textured cat litters. Avoid hooded or covered litter boxes as the enclosure exaggerates odors within and minimizes them without, often leading to less frequent cleaning. Provide one litter box for each cat in a household. Use familiar brands of cleaning, disinfectant, and litter. Use a combination of new and old in order to acclimate felines to new products. Most cats prefer sandy litter, changed on a daily basis. Make sure to clean accident areas thoroughly in order to lesson attraction to the same area. Products such as Feliway spray repel cats from accident sites, while products such Cat Attract help get them back into the litter box.
A cat who appears to be in pain while urinating almost certainly has a medical problem and should be taken to a vet immediately. In the case of inappropriate urination, rule out medical issues first as they can quickly compound if not dealt with in a swift manner. If the problem appears behavioral in nature, but is not remedied within a day or two, it is wise to consult a vet in case the problem is compound, that is, both medical and behavioral.