For the purposes of this article, I am referring to pets that YOU own... not stray or lost animals, however I have included a small bit about these guys at the bottom of the article.
I will also note that if a person has made the decision that they are NOT the best owner for a pet, it is unfair to keep the pet. However because there are more unwanted pets than there are homes, it is always a risky decision. Put some thought into it before you simply get rid of any pet.
What Not To Do
DO NOT give an animal away "Free to a Good Home". Studies have shown that very few of these animals actually get "good homes". Most never get any veterinarian care. Many never get fixed (spayed or neutered). Many who go missing are not looked for, their owners simply go get another free one. Some serial killers have admitted they started on "free to good home" pets. It is possible for somebody to accept a "free" pet, then sell it to a research lab or use it for snake food (as it is their animal now to do with as they will, dependent on area laws). A "good" owner would buy from a reputable breeder or adopt from a shelter.
DO NOT turn it loose, or dump it in the country. Farmers often shoot nuisance animals, or their own animals fight with the new comer. Many farm pets are not looked after to the extent city pets are used to... Many farm cats are not even fed regularly. You might think all farms need more pets, but in reality this is not the case. Abandoned dogs will run for hours after a owner who has driven away. Dumped pets suffer from the inability to find food or water. They are attacked by other animals, like coyotes. They are at risk for being hit by cars and left suffering for hours without care. In many areas this is a criminal offense known as "Animal Abandonment".
DO NOT rehome an aggressive or sick pet. Take it to the vet for euthanasia. In some areas you could be sued for knowingly passing on a problem pet to another person.
What To Do
BE HONEST
The first thing you need to do is admit why you are getting rid of the pet. Is it because of a condition on your part or something wrong with the pet? For example, many people get rid of cats because the cat is urinating in areas it should not. This is often a medical issue and should NOT be passed on to another owner. If you are not willing to treat the cat, then you should euthanize it rather than dumping it on another person (as mentioned above), or at least be honest about the problem. A new owner who knows of the issues will be more forgiving than anyone who gets a surprise.
If you got the pet from a Reputable Breeder you probably have a contract requiring you to return the pet to them. This contract is usually for the lifetime of the pet. As such the breeder is the first person you should call. The same applies to people who got pets from rescues or Animal Shelters. Read your contract or call them.
Call your local SPCA, Animal Shelter, or whomever deals with unwanted animals in your area. If you are not sure who that is, call a veterinarian. In some areas there are "no-kill" shelters but these are usually full, and this is not always the best option for an animal. They may sit in a cage for years, never getting a home. Other, more adoptable, animals will be euthanized because of your animal sitting in a cage taking up room. If your pet is a problem animal, do not take it to a no-kill shelter were it will only become more of a problem and get more stressed.
Shelters who do euthanize animals after a period of time give animals a fair chance, if the animal is not adopted after a good period of time, it probably will never get adopted and will be humanely euthanized. If your animal is one which is in high demand, they may even have a waiting list and can help find the pet a new home quickly. Be honest... DO NOT lie and tell them the animal is a stray, this will not help your pet. People are more likely to adopt an animal with a known history and some information, than one who comes in as a stray. Shelters are more likely to put an animal up for adoption of they know something about it. When you give them your pet, make sure you give them a few of its favorite toys and its food as well.
We adopted 2 cats recently from the RSPCA that also had been dumped in a remote village. They were found in a cardboard box.
What drives people to dump their pets is beyond us! It is unnecessary & extremely cruel.