Gums are pretty tough, but they can get cut by things like hard toothbrush bristles, sharp objects in the mouth (like pens, pencils, or pointy chips), sports injuries, and just playing around. Fortunately, most gum wounds heal well on their own and don't require medical attention. However, if a cut on your gum is deep, won't stop bleeding, or appears infected, you should contact your dental professional.
For minor cuts, you can expect a few days to a week at most for the gums to heal. The first thing to do is to clean the wound. This can be done by irrigation (spraying it with water) and antiseptic mouthwash. It's also important to keep the wound moist, so apply a clean, soft bandage over the area.
You can also use a cold compress, which will slow circulation and stop the bleeding, as well as reduce swelling and numb the pain. Just make sure the ice doesn't come into direct contact with the skin!
For more serious wounds, a dentist may prescribe antibiotics to prevent infection and pain medication, such as ibuprofen or acetaminophen. In some cases, the doctor may recommend that you receive stitches in the gums. These usually dissolve on their own within 5-6 days, but if not, the doctor will have to remove them manually. In general, it's best to avoid getting cut gums by avoiding foods that are hard or sharp in the mouth and wearing a mouthguard when participating in sports.