If the environment remains constant (ex. no recent moves or change in litter-box placement), then the cat probably has some health issue such as urinary tract infection.
That's a vague question, but often cats will eliminate outside the litter box if the box hasn't been cleaned, or the smell of the litter is uncomfortable or offensive to them.