If you plan on trimming your dog's nails, ask your veterinary staff to show you how to trim nails to keep them close to the quick (live part of the toenail). But be aware, just about everyone who tries to trim their own dog's toenails will at one point clip them too short. This may result in what seems like severe bleeding.
To perform first aid on a fractured or broken nail, try to determine if there is a loose piece that can simply be trimmed with a nail clipper. If a fractured end or nail fragment is attached merely by a small strand, cut the loose piece away. If the nail is fractured but still well attached a little super glue may stabilize it until your veterinarian can check it for actual trimming and coagulation of the quick.
To stop bleeding from a nail that is trimmed too close to the quick or broken away from the quick, you can pack the end of the nail with bar soap, styptic powder, cornstarch, flour, or tea leaves from a tea bag. Pack the coagulant up against the bleeding quick, and hold it there for a minute or two. Remember, animals in pain sometimes bite out of self-preservation instincts, so keep an eye on your animal. Occasionally a nail that breaks off very close to the nail bed results in an infection in the toe. This will require a veterinary clinic visit and antibiotic treatment, so watch for any limping that persists longer than two days.