First, take her to the vet to have her checked for a UTI. Most cats stop using the litterbox when they get sick, so it could be any sort of illness, but UTI's are the most common culprit.
A few questions though, have you moved, is there a new animal in the house, have you changed litter recently, how much water is she intaking daily, what kind of food do you use (some foods can cause UTI's to occur), have you moved the litterbox to a new place, what is she peeing on most often (carpet, tile, counter tops etc), is she spayed?
If there turns out to be no illnesses, then the best way is to go about retraining your cat. First, put kitty in a bathroom with a litterbox and her food and water. She will be very unhappy about the situation, but this is the best way to retrain a cat. Leave her in the bathroom until she is using the litterbox frequently. You may also want to pick up a product called Feliway. It's a plug-in that helps ease stress in cats. When she begins using the litterbox again, let her out for periods during the day when you are home. When you aren't home, back in the bathroom. Continue to give her more and more time out of the bathroom and eventually she should be just fine again. Like I said, your cat may not like it, and there may be some people here that don't agree with doing it, or that it sounds mean, but in my opinion, it's a better option than getting rid of her or just letting her run around outside where she could potentially be killed or continuing to let her ruin the house
Also, while she's in the bathroom, get a really good cleaning product called Nature's Miracle. You can find it at most Petstores. It gets rid of the smell so animals are less likely to begin peeing on the same spots.