The discoloration is from bleeding, which may appear as vertical streaks beneath the nail. The condition usually affects the big toe or the one next to it. Tennis toe is often caused by modern tennis shoes, which give such good traction that the foot is forced to the front of the shoe during sudden stops, thus traumatizing the nail. Shoes should have a finger's width of room in front of the toes. Initially, you can use cold packs and painkillers like aspirin to provide relief if the pain is severe.
Medical care can also help.
When to stop, when to resume. Swelling, stress, and strain won't necessarily mean you have to stop playing altogether. You may just have to scale back. Assessment and treatment by a medical professional can pave the way to pain-free playing. Don't try to return to full tennis activity immediately after an injury or other forced layoff.