Resting is the main treatment for stress fractures. You will not do the activity that caused the stress fracture for several weeks while it heals. Shoe inserts, braces, or crutches might be used to help everything heal correctly.
When you start the activity again, you'll need to take it very slowly and carefully to avoid having another stress fracture that could be more serious and more difficult to heal.
If rest doesn't work, surgery may be necessary.