Dewclaws are the small claw on the inside of a dog's front paws. (Some breeds, like the Great Pyrenees, also have dewclaws on their back paws.) This claw usually won't come into contact with the ground and won't be worn down by everyday wear the way other claws will be. No matter what the breed, the argument about dewclaws is ongoing.
On many dogs, the dewclaw is not a completely useless appendage. They will use this extra claw much like a thumb, to steady what they are chewing on or to hold bones and rawhides. This can be done when the dewclaw is attached with bone and muscle; in some dogs, the dewclaw is only attached by skin and cannot be used like this.
Dogs that regularly compete in agility or work as herding dogs have also been shown to use their dewclaws for practical applications. When turning quickly, dodging or herding, the dewclaw can come in contact with the ground and may act just as other claws, helping the dog to grip and maneuver.
These extra claws can be very delicate, and since they can form differently even on dogs of the same breed, deciding to remove the dewclaw should be determined on a dog by dog basis rather than based on any all-encompassing breed rules. On some puppies, the dewclaws may not develop to be firmly attached to the leg. If the claw seems loose, or dangles away from the leg, it can be safer to have the claw removed before it is damaged by everyday wear and tear. This can especially be dangerous for a dog that likes to dig; a sharp rock or stone can easily cause permanent damage.
Hunting dogs or dogs that commonly accompany their owners through rough or wooded terrain may also have their dewclaws removed for reasons that are not purely cosmetic. Dewclaw removal originally began as a way to protect the dog from injuries sustained when dewclaws were hooked on underbrush or debris when running, chasing game or herding livestock. Depending on the intention for the dog, many times the claw will be removed within days of birth. Like many other surgeries, performing it this while the dog is young will allow the cut to heal faster and cause less pain to the dog. Dewclaws can be removed from older dogs, but the surgery is usually more complicated.
Dogs that are largely homebodies and house pets can easily go through life without any problems regarding their dewclaws. For many dogs, removing the dewclaw is an unnecessary surgery.
For dogs that have their dewclaws intact, it's crucial for owners to keep them as comfortably trimmed as other claws. An untrimmed dewclaw can be incredibly sharp and much more likely to hook on something. If it does get hooked, it can be extremely susceptible to tearing. If this happens, it's just as painful as a person having a fingernail torn out, and can will be sensitive throughout a long healing process.
Should a dewclaw be torn, remember that it's extremely painful. Clean the torn nail with gentle soap and water as best as possible. Applying pressure with a clean bandage can help stop any bleeding, but the dog should be seen by a veterinarian as soon as possible. They will not only be able to trim back the dewclaw, but will be able to advise whether or not it should be removed. They will also likely prescribe antibiotics to keep the claw from becoming infected and causing more problems.