The first thing to consider is how well your pet can be identified and traced back to you. Ideally you should think about the potential loss of your pet before it ever happens.
Animals can be identified in a number of different ways; the simplest method is to put a collar on your pet with a tag giving your details, (name, telephone number and perhaps address). This often works well but there is always the risk that your pet may lose the collar and with it its identity. Secondly, a more permanent method of identification such as tattooing or microchippping may be used. These methods have the advantage that they are permanent and will remain with your pet. Microchipping is now very commonly used and is definitely successful in re-uniting lost pets with their owners in many cases.
If your pet does go missing it is important to start looking around the local area as soon as possible. Walk around locally and ask people if they have seen your pet, leaving your contact details with them where possible. If you can get friends or family members to help, you will be able to cover more ground more quickly. Ask local people to check in their garages, greenhouse and sheds etc- anywhere your pet may have been accidentally shut in.
It is a good idea to put up posters of your missing pet, which ideally should show a photograph of the missing pet and your phone number. These can also be posted locally or given out. Many establishments may be willing to put up your posters including your local vets, animal rescue centers and pet shops; you could also try your local post office and general store since many members of the local community will call in to such places regularly.
Of course you should contact your local veterinary practices, pet rescue centers and other animal shelters and charities; they will often keep a log book of locally reported lost and found pets and they may be able to re-unite you with your pet if they are found and handed in for care. Many web-sites have a section for lost and found pets too and you should add your pet's details and check the "found" section regularly.
It has been known for pets that have been missing for considerable periods of time to return home or be found unexpectedly so do not become despondent and give up hope too easily.