Offensive odor can be caused by bacteria on your skin and clothing. Soaking your feet in antibacterial soap several times a day for a week, followed by washing well with the soap daily may help.
Before putting on your socks and shoes, apply a foot powder. It is also important to keep your feet dry during the day.
In a more scientific explanation, sweaty feet (hyperhydrosis) and smelly feet (bromohydrosis) are conditions of the feet. While some cases of excessive smelling or sweating of the feet are systemic (throughout the whole body) in nature, such as anemia (low blood count) or hyperthyroidism (overactive thyroid), these conditions are usually of a local cause. There are many foot care products available in your local pharmacy or grocery store.