Bacteria are the main culprit of smelly feet. These creepy crawlers adore dark, damp spaces, making sweaty shoes a great place for them to live. They eat the oils and dead skin on your feet and begin multiply. Organic acid begins to form from their waste. These acids are what cause the feet to smell so bad, especially for those that do not wear socks. 
There are many things you can do to prevent this horrible smell. For starters, be sure to wash your feet everyday with warm water and soap. Never wear dirty socks, keep your toenails clipped, and keep your feet as dry as possible.