Anal glands are two glands located by your pet's rectum. They contain fluid that excretes whenever the pet (dog or cat) has a bowel movement. If your pet is scooting across the floor on his bottom or spends a lot of time licking back there, it is usually a sign that the anal glands are overly full, and the animal is trying to empty them. However, if the pet continues the scooting and/or licking, it's time to see the vet so that the anal glands can be manually expressed. Some animals have chronic problems and their glands need regular expressing, and others have no problem with the anal glands at all. Hope this explanation answers your question.
Also Sarah, if your dog does not have firm poops then the likelyhood that the anal glands are not getting expressed properly increases. If your pets stool is soft, one should consider switching to a good quality food to try and cause the stool to firm up. Our dogs will occasionally need their glands expressed manually but the vet showed us how to do this at home.