Still, it's not trivial to take good pictures in a zoo. Try to shoot from an angle so that you won't see any walls or fences. You will get the best results on a bright, sunny day - if the animal is in the sunshine and the background is in the shade. It helps to use a large aperture (low f-number) to blur the background. You can see the effect of these tricks in the meerkat photo - there are no distracting fences, bars of a cage, or people visible in the background.
Once you have mastered taking photos of animals in the zoo you can consider taking photos of wild animals. But keep in mind that there is a huge difference between taking a photo of an animal in the wild and one of an animal in a controlled environment. The challenges of getting good shots of truly wild animals are often overlooked! In most circumstances you will need a good tele lens to get a good pic of a wild animal. There are exceptions - in some national parks (e.g., Ethosha National Park, Namibia) you might get close enough to the animals to get a good shot with a standard lens.