How can I prevent athlete's foot from coming back?

Keeping feet clean. Wear clean socks changed daily. Avoid. Public showers. It might be a good idea even after you get rid of it to use an antifungal agent like once to twice a week as a preventative maintenance dose.
Hygiene. Wash and dry. Change socks often, daily foot powder, alternate shoes day to day and wear flip flops in public showers.

Related Questions

I am a 42 year old woman, I have dealt with athletes foot & jock itch in the past, now a week before my menses they come back & go away after 2 weeks?

Hormonal changes. Hormonal changes could effect sweat duct activity. I would recommend painting gentian violet (otc) on the affected areas 2-3 times a week and using an anti-fungal powder daily. This should be done always.
Tinea. Has to do with your hormones make sure to use ant fungal spray on a regular basis.