It's funny how something as commonplace and seemingly simple as living with a cat, can be so multi-faceted!  Why are some cats so easygoing, while others are often acting up? Why are some "doggishly" devoted to their owners, while others hardly acknowledge your presence? The cat's genetic heritage and prior life experiences certainly come into play, but there are also plenty of variables in your shared day-to-day life that YOU can control...and that have a big effect on your cat's behaviour!  Here are some thoughts on making (and keeping) the cat in your life a happy, well-adjusted kitty. These things were taught to me by my own treasured kitties over the years...and I am grateful for the time I had/have with every one of them. :-)

The "secrets" to Happy Cat?  In my opinion:
-Prize your cat, his happiness, and the relationship you have with him.
-Make time for meaningful interactions and enjoyable activities.
-Do Not Declaw your cat. This one simple mistake can create a lifetime of problems.
-Be aware of his varied needs, and provide for them.
-Commit to your cat as Family...and plan to stay beside him, come what may.

The one facet I would stress above all others, is to
consciously place great value on your cat, and make sure he knows it. ;)  Cats respond to this treatment in kind!  You can't over-build a cat's ego--the happier and more secure he is, the better behaved and more loving he is likely to be. (Contrast this to dogs, who can be ruined by *too* much human servitude and deference. lol) Build his confidence and his sense of self-worth. Notice and appreciate the little things he does. Remind him every day that you love him, and he is beautiful (or brilliant, or agile. Rotate your compliments, but do sound sincere)!  I suspect that cats, as a race, have never forgotten the days when they were worshipped...and they soak up that treatment as much today, as they did back then.  ;)  Keeping a cat feeling good and secure about himself and his life is perhaps the best way to ward off troubles--if Kitty ain't happy, ain't *nobody* happy!

Another important (and related) priority is to
build a close, interactive relationship with your cat. Though cats fare better than dogs when faced with lack of leadership and being left largely to their own devices, that isn't an IDEAL human-cat relationship. A cat in a close relationship takes much more interest in his humans...most cats truly want to have a special human friend, who provides things to look forward to every day. Different cats like different things (you'll figure them out over time), but here are some examples from my current daily life:

-My guys come to greet me when I get home. They want me to acknowledge them, first thing (heaven forbid I walk by with my arms full of groceries & temporarily ignore them! It genuinely hurts their feelings)...I am supposed to say "Treasure! There's my beautiful Treasure!" with a big smile...and he makes eye contact and meows in return. I ask him to hop up on the counter...he gets brushed (he loves it). The other cats join us. I say "who wants ***special food***??" (that would be canned food) Various meows and dances, it's our little routine. Everyone gets canned food, I stroke them and praise them while they eat.
-Rizon kitty wants a treat...I say, "Rizon, sit down please!" Rizon sits, and I hand him a treat. Or I get him to do something else for it. Rizon may not want to be picked up today, for some reason; so if he says that, I'll scritch his head instead. I know just the way he likes it, through trial and error. <grin>
-Rio kitty wants *hugs*. "Where's RIO?? Does he want *love*??" I pick him up and hold him close, and he purrs like crazy. Most cats don't like to be hugged and squeezed and carried around, but Rio does. lol  Rio also wants me to throw a toy..."bring it back, Rio, and I'll throw it again!!" (Some cats get too over-stimulated by handling/petting, and would rather just play. They need an outlet for that spazzy, predatory cat energy anyhow!)
-Treasure wants his catnip (he has a touchy tummy and that calms it). I say "Treasure, let's go to the Magic Catnip Tree!" He runs to his cat tree (about 5' tall, cats need a high safe place to call their own) and climbs to the top. I set his ration of catnip down, stroke him and act excited about his 'nip while he eats it. If he gets a little "wired", and digs his needles into me, I freeze, go limp, wait for the claws to retract, remove my hand slowly from his grip, and walk away--pretending to "lose interest" in him. (I have gotten quite good at reading the warning signs of "I am all revved up and I'm going to needle you!", so I rarely get that anymore.)

combination of happy routines, security, play, food rituals, and cause-and-effect ("if I do this, Mom gives me a treat!") will  foster a real relationship with your cat. Positive reinforcement training is a big are whatever little games you can make up. We play the "Big Eyes" game: kitty is playing or sitting on the floor. I peek over the edge of the bed (or a chair), make my eyes really big and scared-looking, then quickly duck back behind the bed. Repeat a few times--this game will normally get the cat's attention quickly. Cat creeps closer and closer with every peek.  ;) Finally, you will make Big Eyes, duck behind the bed, and suddenly BOO!! ...the cat leaps up on the bed to "get" you. Act very surprised, like his BOO really scared you! They love that, it makes them feel fierce.  lol

I also have a bedtime routine with my oldest, Treasure. "Where's **Treasure**?"  "Meow?" "Treasure, mama is ready to go nite-nite..." Most nights, he will follow me into the bedroom, but some nights he is feeling funky, and needs me to go the extra mile to make him feel wanted.  "Oh, Treasure, mama wants you to come nite-nite with her" I say, scooping him up gently and carrying him to bed. I set him down, he begins to knead the pillow. I stroke him and praise him for 'getting the pillow ready for me', then we go to sleep. Of course, some cats would be offended if you pushed the issue, they may have better things to do.
Each cat is very much an individual! In Treasure's case, he *loves* to sleep with me, but has insecure nights where he won't 'impose' on me, and he wants my reassurance that *I* want him there. (All of my guys have times when they wait for a response...regularly one will come sit by my chair, stare at me, and wait for me to tap the arm and say "Rizon, please come sit with me!" before hopping up. They are *very* interactive. ;-)
Of course, part of interaction is understanding how to interpret what your cat is saying. Communication is a two way street! Feline body language is perhaps harder than canine, especially since there's much less information on it available. However, if you observe your cat carefully, you will soon be familar with all his moods and with what his ear twitches, tail flicks, and various looks mean.  ;-) 
Make loving eye contact; talk to your cat often, and send him mental pictures. It may take him some time to learn words, but he can pick up on your tone of voice, your emotional state, and possibly even on things you visualize.
Granted, there is a "species gap"...the idea is to bridge that gap before it becomes a full scale communication breakdown.

Any companion animal will occasionally throw up some speedbumps. Kittens in particular can be wild little hellians--and with good reason: cats are actually nondomestic animals! The babies are born with more than a few "wild hairs", but they settle down as they learn how to fit into your world. Kittens are also stinky! until their bodies adjust to kitten food. Bear with him, this too shall pass.

As with any species, the best path for living in harmony is to understand what the animal was designed to do, why he does it, and how to communicate with him. 
When bad behaviours crop up, there is a REASON--illness and insecurity are the main ones, but he may also be acting out in frustration or making attempts to communicate. To fix the problem, don't get angry or combative: learn about feline behaviour, ask your cat "WHY did you do that?"...and look/listen for the answer.  Cats do not handle change well, they are easily stressed...and they also have VERY limited ways of getting your attention!

The most common behavioural issues with cats are house-soiling and scratching, so it's worth mentioning those right off the top.
A c
at who suddenly pees outside his litterbox should be taken to the vet as soon as possible, to rule out a urinary tract infection (UTI). These are fairly common in cats, especially males, and can be fatal in a matter of days if left untreated! To lessen the risk substantially, feed a high quality food, and consider a water fountain such as the Drinkwell. Most cats don't drink enough water (in the wild, they would get much more moisture from raw food than they do from dry kibble) and they dehydrate quickly. Running water is especially appealing to cats, which is why fountains are usually effective. In addition to water, many people believe that food should always be available to cats as well. Cats prefer to eat very often, in small amounts, and the security of always having food available is an added plus.
Most cats are fastidious about their litterbox, but various things (aside from medical issues) can turn them off to it. Keeping the litterbox very clean, providing a litter they find appealing, and offering 1 litterbox per cat as a rule of thumb will all help. If your cat is picky about his litter, consider a crystal or pine formula. (Avoid clumping litter for kittens, as they will occasionally eat it, and if it clumps in their intestine they can die.) My guys will go to the litterbox more often than they actually need to, just because they love to scratch in the crystal litter!

Another primary cause of house soiling is DECLAWING.
Declawing causes a wide range of serious behaviour problems, as well as long term physical complications, and should NEVER be considered as a "routine" procedure for cats.  Please read this link on the reality of declawing your cat. There are plenty of kinder, simpler "fixes" for cats who scratch; declawing CREATES many more issues than it "solves". Aversion to the litterbox--due to the pain associated with covering his wastes after the surgery--is a common side effect of declawing.

Biting issues:
teaching bite inhibition to kittens is normally a simple process...just make the bitten body part go limp, and squeal in a loud, high pitched voice when bitten! If you are consistent, most cats learn quickly that biting hurts you, and when you are hurt you cease playing/petting and make an unpleasant sound. Redirecting the kitten's attention to a more appropriate object for biting will help a lot, as well. Unfortunately, declawing can also cause some biting issues that are more difficult to resolve, and require more patience while the cat is retrained and his confidence is built back up. Cats take a severe hit to their confidence and self esteem, feel physically vulnerable, and often have intense long-term pain when declawed, so please keep this in mind and be extra-compassionate when retraining a biting (or litterbox-avoiding) cat who has been declawed.
Cats are easily overstimulated; this is why a cat who wanted you to rub his tummy two minutes ago, is now sinking teeth into you. Merely go limp, stay calm, remove your body part...and resolve to be more aware of his social signals next time, so you can stop petting him *before* he gets overloaded and bites.

correcting behaviour problems in general, a few things to keep in mind:
-Focus on PREVENTION--praising the right stuff, not DAMAGE CONTROL (i.e. waiting for mistakes and punishing them after the fact).
-Never hit or shake a cat, they do not understand physical corrections. It's simply not part of the feline psychology! Cats in the wild, unlike canines, never physically correct each other. Causing him pain will do plenty of harm, and absolutely no good--the only possible outcome is to teach him that you are to be feared, distrusted, and avoided.
-Outsmart them! In the rare cases where an aversive is necessary, make it look like the "bad consequence" is coming from the environment...NOT from you.
-If necessary, use Time-Outs--remove a cat who is acting poorly to another room, or to a crate. We trained Dylan kitty very quickly to stay off of our dinner plates using this method:
Dylan would launch himself onto your plate & eat your dinner right in front of you. Needless to say, he was crated during dinner for awhile. We'd set the crate near us (ohh yes, close enough to see & smell the food), and he'd be yeowling and rattling the crate door...and we'd ignore him. It wasn't long before he'd sit quietly in the crate, and we said "are you going to be good now, Dylan?" and let him out. He soon learned that if he didn't stay off our plates till we were done, it was "Back In the Box" for him! So, he would lie beside us and wait till we had finished, and actually *offered* him the food.

Provide acceptable outlets for normal feline behaviour (scratching, playing/hunting, climbing). You don't want him to bottle up all his basic needs until he explodes in an inappropriate fashion.
Offer "vertical territory": clear windowsill space, offer access to cabinet tops or high shelving, build him a good cat tree, set up a cozy hammock.
Acclimate him to basic handling. With kittens, we do "Liquid Cat"--when setting him down, slowly "pour" him out of your hands headfirst, sliding your hands down his body the whole way.  ;)  Hold him up high to see interesting things he can bat at, so he has good associations with being scooped up and held in the air.  When holding a cat, support his back legs so he doesn't feel like he is falling...unless having a platform for his "springy feet" tempts him to leap out of your arms, in which case some cats actually react better to being supported in the arch between their back legs and their rear. ;)  Slowly get him used to being brushed, and always keep it pleasant and positive so that he *likes* it! 
Overall, any behaviour that gets a positive response is likely to be repeated...and anything you need him to accept, should be introduced in such a way that it is enjoyable for him.

Spaying or neutering is *highly* recommended.
Unused heats are very hard on a female cat's body, and breeding her is strongly discouraged--too many unwanted kittens and cats are killed every day, for the crime of being unwanted and unloved.  Every one of those beautiful lives would have been precious and amazing, in its own unique way...yet the sheer volume of them has sentenced them to go to waste. Females in heat also attract males, as well as put you through constant meowing and the guilt of knowing she is uncomfortable.  Intact males spray, 'nuff said. They also can create babies at an alarming rate. Also, fights amongst competitive intact cats are much more common than amongst neutered cats, who have little to fight over.
Please don't let him suffer with fleas, ear mites, matted fur, or the like. Even though cats often act stoically about their pain and discomfort, they have a much better attitude when they are not physically compromised...just like us humans!

You may even want to consider putting up a small fenced area, where you can also let your cat outdoors to explore without him getting into trouble ;) Most areas of the country are very unsafe for free roaming cats these days, but a small "cat yard" is a wonderful compromise!

Granted, there are plenty of other daily variables that affect your cat, such as other cats (or dogs) in the household, his surroundings and living situation, medical conditions, and so on. It's impossible to account for all the variables (!) and the purpose of this page was simply to offer some ideas for enhancing your human/cat relationship. This is what worked for US! I would *love* to hear what worked for YOU...and can be reached at this email address. :-)

Lastly, here are a few good kitty links:

General cat handling (geared for shelters, but...)--
Territorial marking, litterbox use, and scratching--
The truth about declawing--
Tons of feline behaviour links--

Dreaming of the day when ALL cats are Happy Cats! :-)