Practice calm behavior
Remember that any type of attention or contact can be potentially reinforcing. Practice "Caught you being good" and remember to reinforce behavior you want to see (by petting, offering verbal praise, or giving delicious treats) and ignore unwanted behavior. Be proactive instead of reactive.
Socialize your pet early
Offer your pet opportunities to meet other animals of its own species as soon as possible. The more early and purposeful exposure your pet has the more comfortable he will be with meeting new friends. Introduce your pets to new species, carefully, if you intend to have a multi-species household.
Establish a relationship built on trust
Every time you interact with your pet, you are either maintaining, building, or degrading trust. Do your best to make every interaction a positive one, or maintain your current level of trust. Think of trust like a bank account. Each interaction can be a deposit or a withdraw. Positive, trusting relationships are those which form the strongest and unbreakable bonds.
Your pet can be trained to do anything that is physically possible and with some creativity on your part. Your pet can learn a lot of things, but if you do not learn together and also provide a consistent environment with consistent expectations, you can expect that your pet will absolutely be unpredictable. Do your part and learn alongside your pet. Watch a bond develop that you might not have ever conceived as possible.