In a perfect world, your cat would be born with litter box instincts that naturally and automatically produce a perfect litter box every single time. Unfortunately, that is not the case. While cats are naturally tidy creatures and instinctively bury their waste, a little help in litter training your cat is required.
First Steps First
Litter box training will go a lot easier if you ensure the litter box is attractive for your cat. Make sure you have enough litter boxes that are easily accessible but in a quiet and private place, and choose a loose grained unscented litter.
While covered or self-cleaning litter boxes might sound appealing to you, they are quite intimidating for cats and not the best option when you are training your cat to use them in the first place.
Kittens
Kittens from indoor household cats will learn to use the litter box from their mothers. This happens around the time they are four weeks old, and very little intervention from humans is required. When you adopt a new kitten who is already litter trained by its mother, all you will need to do is help it find the litter box in its new home.
Make sure the litter box is in an easily accessible area for your kitten. If your home has several floors, it’s a good idea to make sure there is a litter box on every level. A kitten’s bladder might not hold up long enough for it to find the litter box in the basement.

If your kitten hasn’t been introduced to litter boxes by its mother, you’ll have to invest a little more time and patience. Take your kitten to the litter box after meals, when it wakes up from naps and after serious playing sessions.
Gently take its front paws and scratch the litter. Don’t worry if he doesn’t use the litter box every time you take him. Just make sure he knows where it is and take him there regularly. Pretty soon, it will learn where the box is and will be able to use it independently.
Indoor Cats
If you adopt an indoor cat who already knows how to use the litter box, then most of the work is already done. If possible, get some tips on the previous owner as to its litter preferences. This will save you a lot of litter testing.

When you bring your newly adopted cat into your home, it’s best to keep the litter box in a comfortable place for them and then gradually move it to where you would like the litter box to end up. Introduce your cat to the litter box as soon as you walk in the door.
Your new furry friend will probably spend the first hours or days in hiding; that’s ok. Just make sure the litter box is within easy reach. You can move it later.
Outdoor Cat
Even outdoor cats that have been brought indoors can be trained to use a litter box. Keep the cat in a small confined space, where it doesn’t have other options for relieving itself. The bathroom is a good idea.
The floors are easy to clean, and it will ensure you have regular interactions with your cat as well. Obviously, you need to make sure that there is enough food, water, and toys around. Keep the litter box in the farthest corner away from the food.

Once your cat has been consistently using the litter box for up to two weeks, gradually increase the “free-roaming” space, making sure litter boxes are always easily accessible. If you find your cat is still not using the litter box exclusively, you will need to size down.
Perhaps even as small as a dog kennel. Once your cat is ready to graduate to larger areas, keep bringing it back to the original space (with the litter box) at the times it “goes potty.” Keep an eye out for any irregular potty places. If there are still problems using the litter box, start over. Remember that the key is consistency (on your part) and patience. The time you invest now will pay off in the end.
General Tips
The most important thing is to keep the litter box experience a positive one. Scolding your cat for wrong or no litter box use will get you nowhere. In fact, it may make your cat apprehensive about you and the litter box.
If your cat has an accident, carry your cat to the litter box and place him in it. Clean up the accident with an enzyme cleaner that will remove the smell and keep a positive attitude. Your cat will get the hint soon enough.
If you find that your cat continues to use certain areas of your home as its litter box instead of the awesome litter box you bought just for him, try moving the furniture around. Clean the area with an enzyme cleaner that removes the smell of cat urine or faeces (as the scent might attract the cat again in the future) and changes the area’s look.

Add a chair, a garbage can, a desk. Cats are creatures of habit, and if you change his preferred bathroom area, he might be inclined to find a more suitable one.
Make sure your litter box is attractive. Try changing the litter. Perhaps it’s choosing your closet because he doesn’t like the feel or smell of the litter in the litter box. The vast majority of cats will use a litter box successfully. Most problems associated with improper litter box use are likely due to lack of litter box cleanliness (by cat standards), the stress in the environment or litter preference.
Problems
If your cat persistently keeps avoiding the litter box, even after you have tested different litters and placements. Certain physical problems reveal themselves in altered litter box use.