If shoes are too tight or the toenail is cut too much, the edge of the nail may grow into your toe instead of out. It can be very painful.
If you don’t have any issues with your feet and the ingrown toenail isn’t too bad, you can treat it at home. Wear sandals or very roomy shoes while it heals. Soak it a few times a day but otherwise keep it dry. See a doctor if it does not improve within a few days or if it gets worse.
If it is infected or you have issues such as poor circulation in your feet, a doctor needs to deal with the ingrown toenail. You may need to take antibiotics and the nail or tissue near it may need to be partially removed so it can grow correctly.