Generally it can be broken into either a behavioral problem or a medical problem, though some underlying medical problems can lead to a chronic behavior change, so it is of utmost importance to get to the bottom of it quickly because the longer it goes on, generally the harder it is to remedy. Behavior problems can include having something that frightened her while in the box and disrupted or continues to disrupt her ability to have a bowel movement the way she prefers (another cat, a child, a washing machine that kicks into spin cycle)... Some cats also decide they want a separate box for urination and bowel movements. Make sure you haven't changed the litter, the box location, or something else like that recently. Medical causes can include intestinal parasites, constipation, enteritis, anal sac problems, and more. It is best to start with an exam and conversation with your vet to help further identify the cause of the problem, and a stool sample so they can check for parasites.
I have another cat, should I get two litter boxes?
Ideally you should have same number of boxes as you have cats plus one... so actually 3 would be ideal, in at least 2 different locations.
Do you feel that might be the answer?
I can't say for sure. It is a very good first step, though.
Thank you so much for your time!