While many things can cause ingrown toenails, the major causes are shoes that don't fit well and improperly trimmed nails. Shoes that are too tight press the sides of the nail and make it curl into the skin. Nails that are peeled off at the edge or trimmed down at the corners are also more likely to become ingrown.
To avoid ingrown toenails, you should cut your nails straight across. The top of the nail should make a straight line.