Dealing with a cat who poops and pees in the wrong place is largely a matter of common sense. There is, however, a difference between the reasons behind defecating and urinating in the wrong place.
If a cat is urinating in the wrong place there are two equally important reasons that this. The first thing to do is to check whether your cat has a health problem. Typically a health problem that results in a cat urinating in the wrong place is an infection of the urinary tract. Cystitis is a typical feline infection that causes him or her to urinate in inappropriate places. Cystitis is a bacterial infection of the bladder. You should, therefore, see your veterinary surgeon first before taking steps to try and stop your cat from your urinating in inappropriate places. You need to make sure that your cat is healthy before moving on to the next phase.
On the basis that your cat is healthy, you should then make sure that her litter tray is always clean. That invariably means cleaning it daily at least. Then you should check that the material used is acceptable to your cat. That will mean changing it to see whether it makes any difference. Then you should check that the tray is in the right place. The tray should not be in a busy location. Choose somewhere quiet and out of the way. Change its position and see what happens.
On the assumption that you have the right material in the tray, the right position of the tray and the tray is clean, if your cat still refuses to use the tray you should ask yourself whether declawing your cat is a factor. We know that declawed cats, because of tenderness in their claws, can have difficulty in using conventional material. This problem probably goes away after a while but it is a point worth checking.
Urinating in the wrong place is not the same thing as spraying which is marking territory. I'm sure you are aware of what that means. Normally male or female domestic cats do not spray vertically against objects in the home. Cats that have not been neutered are more likely to mark territory by spraying horizontally. A cat owner should accept it as normal. If they cannot accept it they should get their cats neutered. Therefore, owners should be aware of the difference between marking territory through spraying and urinating in inappropriate places.
Cats also mark territory by defecating at a certain place. This happens less often than urinating against a vertical object. Incidentally, cats also mark territory by rubbing their bodies against objects including very typically the sides of their face where there are glands that secrete a liquid that is then deposited on the object.
However, a cat may defecate on places such as your bed. This is a form of marking territory and an expression of stress because marking territory is a reassuring process. Accordingly, if your cat is defecating in inappropriate places you should ask yourself whether there are reasons why your cat is stressed. This may be because you are absent a lot. Incidentally, stress is also behind urinating in the wrong place due to cystitis.
There are also health reasons why your cat may defecate in inappropriate places. For example, your cat may be incontinent. You will clearly need to take your cat to your veterinary surgeon for a health check before asking yourself whether things that you do, your behaviour, is causing the problem.
These then are, in basic terms, the underlying reasons why a cat may defecate and urinate in the wrong place. There are many articles on this website which deal with this subject, which is one of the most typical so-called behavioural problems that people complain about in relation to their cat companion.
The key to resolving these problems is to check health first then your behaviour and patterns of behaviour second, particularly in relation to whether it causes your cat to be stressed.
It is important to do one's best to avoid resorting to drugs such as Valium and Prozac, mood enhancers that can help cats, before dealing with simple a more healthy issues first. Using mood enhancing drugs is a last resort for both people and cats.
Cats naturally look to a litter tray to defecate and urinate before using any other area in the home. Therefore, you could argue that if a cat defecates or urinates on household furnishings it is because he or she is being forced to do so. It will be a natural consequence of the circumstances under which he finds himself and therefore we could logically say that it is not inappropriate from the cat's perspective.