Sugar is broken into glucose, which raises blood sugar; insulin moves it into cells. Extra energy is stored, partly as fat.
Sugar in whole fruit comes with fibre and is not the main concern. Added sugar in drinks and sweets is. Limit it, and talk to a doctor if you have diabetes.
This is general information, not a substitute for medical advice. If you have a medical condition, are pregnant, or take regular medication, talk to your doctor first.