The swelling in the feet, legs, and ankles is also called water retention, or edema. What might surprise you is that it's caused by not drinking enough water.
It sounds contradictory until you understand how the body works and takes care of itself.
Most nutrients the body requires are obtained in the food we eat. The one that isn't (not in sufficient quantities, anyway) is water. The only way to supply the body with adequate water is to actually drink it. Drinking water provides the fresh water that is needed for the body's functions, and it is contained inside the cells.
The area outside the cells contains a water/salt mix. One of the reasons for this is that salt is almost as important to sustaining life and proper health as water (which is #1). Both of these areas "oceans of water" have to stay in a critical balance.
When you don't drink the water you should you become dehydrated, which throws this critical balance off. Because the body requires water so badly, when you don't drink it, extra salt will be absorbed from the processed food (that people are always warned about) where it is used to attract water wherever it can.
The water it is able to hold onto is held in the area outside the cells (since it is a mixture of water and salt), and with a little help from gravity, this is where the swelling comes from that you describe. The purpose of this accumulated water is to filter and inject into the cells as emergency rations. This filtering/injection process is part of the process that reveals itself as high blood pressure (this doesn't mean that you're destined to develop high blood pressure. It's just one of the mechanical functions associated with high blood pressure).
The way to fix it is to properly replace the water that you lose throughout the day - for the average adult, this comes to around 2 quarts. Reduce your salt intake for a while, since your body is currently in salt retention overdrive.
Once the water levels are corrected the swelling will start to go down and the excess salt will be flushed out. You should then pick up on your salt intake a little - you may have to play around with it to find the perfect balance.