Amanda's explanation is pretty right on. Here's the answer from a FAQ on the Foxstone Maltese website :
Anal Glands: these are two glands found on either side of the anus under the tail also known as "scent glands" which is why you often see two dogs sniffing in that location when they meet, as it is manner of identification. These two glands will normally express a brown, smelly liquid on their own during defecation. They can also be expressed by muscular contraction when the dog is frightened or excited. Sometimes the glands are not naturally expressed and become full or cause irritation which will cause a dog to "scoot" along the ground. An owner, groomer or veterinarian canexpress these glands manually when required. In some cases the glands become impacted and infected which will require manually expressing the glands, sometimes under anesthetic and then treatment with an antibiotic.
I don't think it's anything you have to worry about unless you notice behavior that might indicate your pup has full glands (scooting, etc). The vet/groomer could also tell you, but I know many people prefer to have this done ONLY at the vet, as doing it incorrectly could cause injury