It is more or less a myth that acne
is made worse by diet. Acne essentially is caused when debris--such as dead skin, sweat, and bacteria--clog up the pores of the skin. Anything that increases the amount of debris on the surface of the skin is likely to make the acne worse. Therefore, your idea is not too far off - excessive sweating can clog the pores. Other common causes of worsening acne including dirt, excessive use of cosmetics, etc. The other thing that can make acne worse are changes in the level of hormones in the bloodstream, which can affect the growth of bacteria on the skin; some types of medications can do this, particularly if you have noticed an association between the recent worsening of the acne and a new medication that you have started.
Treating acne generally requires treatments to remove the debris from the skin. This can sometimes just be done with good facial hygiene and exfoliation. Many cases however require a comedonolytic, such as benzoyl peroxide, which can be found in many over the counter acne creams.
If these over the counter remedies do not work, then you should see your primary care doctor
who can give you additional treatments that are stronger.