Does your cat normally go outside? How many
cats are
in the house and how many litter boxes? What kind of litter do you
use and how often do you clean it?
In general, cats like soft clumping litter, cleaned regularly (scooped daily and changed weekly), in a quiet space. Clean the spots where she went potty well with an odor neutralizer and try to block access to the spot. Remember, cats do not respond to punishment, so don't yell at her when you find it after the fact.