I just got surgery on my toe because of an ingrown nail. What causes it and what are the treatment options?

Nails too short. Your great toe tends to be crowded while walking by the side of the shoe and the long 2nd toe in a pinched fashion. If the nail is cut short enough that the edge is buried by surrounding tissue, the pinching drives the nail edge down creating a small cut.Over time, this will become inflamed.If the nail edge is allowed to grow longer, skin passes under the nail during compression and no cut occurs.
Ingrown nail. You state that you just had surgery for an ingrown nail and are just now asking your options ? This is what you as before you have something done, not after. However , your best option was the one you did , so it worked out.
See below. Ingrown toenails can be caused by trauma, tight shoes, tight socks, incorrect cutting of the nail. The best treatment is surgical removal of the ingrown section of nail.