Did your cat suddenly stop using the box? It's actually really a common problem in cats. The first thing you want to do, no matter what you read online, or what you hear people say, is see your veterinarian. There are multiple medical causes for urinating outside of the box, and some of them can be life threatening if not diagnosed and treated quickly. Once your veterinarian has given the all clear, the next thing you want to do is just make sure that that litter box is a clean as it can possibly be.
Make sure you scoop it at least once or twice a day, and put any soiled litter out of the house and in the trash. Make sure to move any food or water stations away from the litter box. Make sure that the litter box is in a quiet place, clean the box only with really mild soap and water at least once a week and replace all the litter at least once a week.
Make sure you're not cleaning the box with harsh chemicals like bleach or ammonia, those can keep cats out of the box as can a smelly box, which is why we want to make sure that it's clean but not harsh smelling. If those things don't help, you should touch base with your veterinarian again, because within a week or so, your cat should be back in the box.