The problem that you have is air drafts. Directly behind the wall against which your carpet is flush is a 2×4 piece of wood that, over time, has shrunk a little. By shrinking, the wood has opened a small airspace that is allowing in air from the outside. Unfortunately, your carpet is acting as a filter and is collecting dirt, dust, and condensation. The first thing you should do is remove the quarter-round molding at the bottom of the baseboard. Once you pull back the carpeting you will see a space between the edge of the floor and the wall. That space is the culprit. Fill the hole with caulking to seal the space and gently put the carpeting back into place. This simple solution will not cleanse the carpet of its dirt and discoloration, but will immediately stop the problem from continuing.