can be fungal or bacterial.
toe nail infection
can spread further so you have to take care to keep the infection under control. maintain good hygeine of your foot by regular washing. use clean socks. consult a dermatologist
if you feel that the infection is persisting or if it is becoming more.
use antiseptic solution to was your feet. it will help.
i hope i have answered your question
wishing you good health